|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collection<AnyType>
Collection interface; the root of all 1.5 collections.
Method Summary | ||
---|---|---|
boolean |
add(AnyType x)
Adds an item to this collection. |
|
void |
clear()
Change the size of this collection to zero. |
|
boolean |
contains(java.lang.Object x)
Tests if some item is in this collection. |
|
boolean |
isEmpty()
Tests if this collection is empty. |
|
Iterator<AnyType> |
iterator()
Obtains an Iterator object used to traverse the collection. |
|
boolean |
remove(java.lang.Object x)
Removes an item from this collection. |
|
int |
size()
Returns the number of items in this collection. |
|
java.lang.Object[] |
toArray()
Obtains a primitive array view of the collection. |
|
|
toArray(OtherType[] arr)
Obtains a primitive array view of the collection. |
Method Detail |
---|
int size()
boolean isEmpty()
boolean contains(java.lang.Object x)
x
- any object.
boolean add(AnyType x)
x
- any object.
boolean remove(java.lang.Object x)
x
- any object.
void clear()
Iterator<AnyType> iterator()
iterator
in interface java.lang.Iterable<AnyType>
java.lang.Object[] toArray()
<OtherType> OtherType[] toArray(OtherType[] arr)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |