|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
List of short numbers.
Method Summary | |
boolean |
add(short e)
Attempts to add the specified number to this collection. |
boolean |
addAll(int index,
ShortCollection c)
|
boolean |
addAll(ShortCollection c)
Attempts to add to this collection all the numbers contained in the specified collection. |
void |
addAt(int index,
short e)
Adds the value at the specified index, and moves elements starting at index to the right. |
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)
|
short |
getAt(int index)
Returns the value at the specified index. |
int |
hashCode()
|
int |
indexOf(short e)
Returns the smallest index at which the list contains the specified number. |
boolean |
isEmpty()
Returns true if this collection is empty; false otherwise. |
ShortIterator |
iterator()
Returns the iterator over numbers contained in this collection. |
int |
lastIndexOf(short e)
Returns the largest index at which the list contains the specified number. |
ShortListIterator |
listIterator()
|
ShortListIterator |
listIterator(int index)
|
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. |
short |
removeAt(int index)
Removes the value at the specified index, and shifts elements starting at index+1 to the left. |
boolean |
retainAll(ShortCollection c)
Attempts to remove from this collection all the numbers not contained in the specified collection. |
short |
setAt(int index,
short e)
Sets the value at the specified index. |
int |
size()
Returns the number of elements in this collection. |
ShortList |
subList(int fromIndex,
int toIndex)
|
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()
ShortCollection
size
in interface ShortCollection
public boolean isEmpty()
ShortCollection
isEmpty
in interface ShortCollection
public boolean contains(short e)
ShortCollection
contains
in interface ShortCollection
public ShortIterator iterator()
ShortCollection
iterator
in interface ShortCollection
public short[] toArray()
ShortCollection
toArray
in interface ShortCollection
public short[] toArray(short[] a)
ShortCollection
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 ShortCollection.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.
toArray
in interface ShortCollection
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.
public boolean add(short e)
ShortCollection
add
in interface ShortCollection
e
- number to be added to this collection
public boolean remove(short e)
ShortCollection
remove
in interface ShortCollection
e
- number to be removed from this collection
public boolean containsAll(ShortCollection c)
ShortCollection
containsAll
in interface ShortCollection
public boolean addAll(ShortCollection c)
ShortCollection
addAll
in interface ShortCollection
c
- a collection of numbers to be added to this collection
public boolean addAll(int index, ShortCollection c)
public boolean removeAll(ShortCollection c)
ShortCollection
removeAll
in interface ShortCollection
c
- a collection of numbers to be removed from this collection
public boolean retainAll(ShortCollection c)
ShortCollection
retainAll
in interface ShortCollection
c
- a collection of numbers to be retained in this collection
public void clear()
ShortCollection
clear
in interface ShortCollection
public boolean equals(java.lang.Object o)
equals
in interface ShortCollection
public int hashCode()
hashCode
in interface ShortCollection
public short getAt(int index)
index
- the index to retrieve the value from.
java.lang.IndexOutOfBoundsException
- if index < 0 or index >= size.public short setAt(int index, short e)
index
- the index to set the value at.e
- the new value.
java.lang.IndexOutOfBoundsException
- if index < 0 or index >= size.public void addAt(int index, short e)
index
- the index to add the value at.e
- the new value.
java.lang.IndexOutOfBoundsException
- if index < 0 or index > size.public short removeAt(int index)
index
- the index to remove the value from.
java.lang.IndexOutOfBoundsException
- if index < 0 or index >= size.public int indexOf(short e)
e
- the number to look for
public int lastIndexOf(short e)
e
- the number to look for
public ShortListIterator listIterator()
public ShortListIterator listIterator(int index)
public ShortList subList(int fromIndex, int toIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |