Package cern.colt.list
Class AbstractCollection
java.lang.Object
cern.colt.PersistentObject
cern.colt.list.AbstractCollection
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
AbstractList
Abstract base class for resizable collections holding objects or primitive data types such as
int
, float
, etc.
First see the package summary and javadoc tree view to get the broad picture.
Note that this implementation is not synchronized.
- Version:
- 1.0, 09/24/99
- See Also:
-
Field Summary
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Makes this class non instantiable, but still let's others inherit from it. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
clear()
Removes all elements from the receiver.boolean
isEmpty()
Tests if the receiver has no elements.abstract int
size()
Returns the number of elements contained in the receiver.abstract ArrayList
toList()
Returns ajava.util.ArrayList
containing all the elements in the receiver.toString()
Returns a string representation of the receiver, containing the String representation of each element.Methods inherited from class cern.colt.PersistentObject
clone
-
Constructor Details
-
AbstractCollection
protected AbstractCollection()Makes this class non instantiable, but still let's others inherit from it.
-
-
Method Details
-
clear
public abstract void clear()Removes all elements from the receiver. The receiver will be empty after this call returns. -
isEmpty
public boolean isEmpty()Tests if the receiver has no elements.- Returns:
true
if the receiver has no elements;false
otherwise.
-
size
public abstract int size()Returns the number of elements contained in the receiver. -
toList
Returns ajava.util.ArrayList
containing all the elements in the receiver. -
toString
Returns a string representation of the receiver, containing the String representation of each element.
-