com.jake
Interface Collection12<T extends java.lang.Comparable<? super T>>

All Known Implementing Classes:
MysteryDataStructure

public interface Collection12<T extends java.lang.Comparable<? super T>>

Interface for a general-purpose, generic container object.


Method Summary
 void add(T data)
          Adds the specified object to the container.
 void clear()
          Removes all elements from the collection.
 boolean contains(T data)
          Returns whether the specified object is stored in the collection.
 void remove(T data)
          Removes the specified object from the container.
 int size()
          Returns the number of data currently stored in the collection.
 

Method Detail

add

void add(T data)
Adds the specified object to the container. data cannot be null.

Parameters:
data - the object to add to the collection.

remove

void remove(T data)
Removes the specified object from the container. If data is not contained in the collection, then this method does nothing.

Parameters:
data - the object to remove from the collection.

contains

boolean contains(T data)
Returns whether the specified object is stored in the collection.

Parameters:
data - the object whose presence in the collection is being queried.
Returns:
whether the specified object is stored in the collection.

clear

void clear()
Removes all elements from the collection.


size

int size()
Returns the number of data currently stored in the collection.

Returns:
the number of data currently stored in the collection.