|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
boolean |
add(short e)
Attempts to add the specified number to this collection. |
boolean |
addAll(ShortCollection c)
Attempts to add to this collection all the numbers contained in the specified collection. |
void |
clear()
Removes all the numbers from this collection. |
boolean |
contains(short e)
Returns true if this collection contains specified number; false otherwise. |
boolean |
containsAll(ShortCollection c)
Returns true if this collection contains all the numbers from collection c; false otherwise. |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this collection is empty; false otherwise. |
ShortIterator |
iterator()
Returns the iterator over numbers contained in this collection. |
boolean |
remove(short e)
Attempts to remove the specified number from this collection. |
boolean |
removeAll(ShortCollection c)
Attempts to remove from this collection all the numbers contained in the specified collection. |
boolean |
retainAll(ShortCollection c)
Attempts to remove from this collection all the numbers not contained in the specified collection. |
int |
size()
Returns the number of elements in this collection. |
short[] |
toArray()
Returns the newly allocated array containing all numbers from this collection, in the order returned by its iterator. |
short[] |
toArray(short[] a)
Returns an array containing all of the numbers in this collection. |
Method Detail |
public int size()
public boolean isEmpty()
public boolean contains(short e)
public ShortIterator iterator()
public short[] toArray()
public short[] toArray(short[] a)
If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.
Like the toArray()
method, this method acts as bridge between
array-based and collection-based APIs. Further, this method may,
under certain circumstances, be used to save allocation costs.
a
- the array into which the elements of this collection are to be
stored, if it is big enough; otherwise, a new array is allocated
for this purpose.
java.lang.NullPointerException
- if the specified array is nullpublic boolean add(short e)
e
- number to be added to this collection
public boolean remove(short e)
e
- number to be removed from this collection
public boolean containsAll(ShortCollection c)
public boolean addAll(ShortCollection c)
c
- a collection of numbers to be added to this collection
public boolean removeAll(ShortCollection c)
c
- a collection of numbers to be removed from this collection
public boolean retainAll(ShortCollection c)
c
- a collection of numbers to be retained in this collection
public void clear()
public boolean equals(java.lang.Object o)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |