|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
List of long numbers.
| Method Summary | |
boolean |
add(long e)
Attempts to add the specified number to this collection. |
boolean |
addAll(int index,
LongCollection c)
|
boolean |
addAll(LongCollection c)
Attempts to add to this collection all the numbers contained in the specified collection. |
void |
addAt(int index,
long 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(long e)
Returns true if this collection contains specified number; false otherwise. |
boolean |
containsAll(LongCollection c)
Returns true if this collection contains all the numbers from collection c; false otherwise. |
boolean |
equals(java.lang.Object o)
|
long |
getAt(int index)
Returns the value at the specified index. |
int |
hashCode()
|
int |
indexOf(long e)
Returns the smallest index at which the list contains the specified number. |
boolean |
isEmpty()
Returns true if this collection is empty; false otherwise. |
LongIterator |
iterator()
Returns the iterator over numbers contained in this collection. |
int |
lastIndexOf(long e)
Returns the largest index at which the list contains the specified number. |
LongListIterator |
listIterator()
|
LongListIterator |
listIterator(int index)
|
boolean |
remove(long e)
Attempts to remove the specified number from this collection. |
boolean |
removeAll(LongCollection c)
Attempts to remove from this collection all the numbers contained in the specified collection. |
long |
removeAt(int index)
Removes the value at the specified index, and shifts elements starting at index+1 to the left. |
boolean |
retainAll(LongCollection c)
Attempts to remove from this collection all the numbers not contained in the specified collection. |
long |
setAt(int index,
long e)
Sets the value at the specified index. |
int |
size()
Returns the number of elements in this collection. |
LongList |
subList(int fromIndex,
int toIndex)
|
long[] |
toArray()
Returns the newly allocated array containing all numbers from this collection, in the order returned by its iterator. |
long[] |
toArray(long[] a)
Returns an array containing all of the numbers in this collection. |
| Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongCollection |
size64 |
| Method Detail |
public int size()
LongCollection
size in interface LongCollectionpublic boolean isEmpty()
LongCollection
isEmpty in interface LongCollectionpublic boolean contains(long e)
LongCollection
contains in interface LongCollectionpublic LongIterator iterator()
LongCollection
iterator in interface LongCollectionpublic long[] toArray()
LongCollection
toArray in interface LongCollectionpublic long[] toArray(long[] a)
LongCollectionIf 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 LongCollection.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 LongCollectiona - 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(long e)
LongCollection
add in interface LongCollectione - number to be added to this collection
public boolean remove(long e)
LongCollection
remove in interface LongCollectione - number to be removed from this collection
public boolean containsAll(LongCollection c)
LongCollection
containsAll in interface LongCollectionpublic boolean addAll(LongCollection c)
LongCollection
addAll in interface LongCollectionc - a collection of numbers to be added to this collection
public boolean addAll(int index,
LongCollection c)
public boolean removeAll(LongCollection c)
LongCollection
removeAll in interface LongCollectionc - a collection of numbers to be removed from this collection
public boolean retainAll(LongCollection c)
LongCollection
retainAll in interface LongCollectionc - a collection of numbers to be retained in this collection
public void clear()
LongCollection
clear in interface LongCollectionpublic boolean equals(java.lang.Object o)
equals in interface LongCollectionpublic int hashCode()
hashCode in interface LongCollectionpublic long getAt(int index)
index - the index to retrieve the value from.
java.lang.IndexOutOfBoundsException - if index < 0 or index >= size.
public long setAt(int index,
long 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,
long e)
index - the index to add the value at.e - the new value.
java.lang.IndexOutOfBoundsException - if index < 0 or index > size.public long removeAt(int index)
index - the index to remove the value from.
java.lang.IndexOutOfBoundsException - if index < 0 or index >= size.public int indexOf(long e)
e - the number to look for
public int lastIndexOf(long e)
e - the number to look for
public LongListIterator listIterator()
public LongListIterator listIterator(int index)
public LongList subList(int fromIndex,
int toIndex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||