|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.longs.AbstractLongCollection
edu.emory.mathcs.util.collections.longs.LongArrayList
Array-based list of long numbers.
| Constructor Summary | |
LongArrayList()
Creates a LongArrayList with initial capacity of 10. |
|
LongArrayList(int initialCapacity)
Creates a LongArrayList with the specified initial capacity. |
|
LongArrayList(LongCollection c)
Creates a LongArrayList, copying to it all elements from the specified long collection, in the order as returned by that collection's iterator. |
|
| 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 |
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. |
long |
removeAt(int index)
Removes the value at the specified index, and shifts elements starting at index+1 to the left. |
long |
setAt(int index,
long e)
Sets the value at the specified index. |
int |
size()
Returns the number of elements in this collection. |
long |
size64()
// PREPROC: Long,Int only 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 class edu.emory.mathcs.util.collections.longs.AbstractLongCollection |
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongList |
containsAll, removeAll, retainAll |
| Constructor Detail |
public LongArrayList()
public LongArrayList(int initialCapacity)
public LongArrayList(LongCollection c)
| Method Detail |
public int size()
LongCollection
size in interface LongListsize in class AbstractLongCollectionpublic boolean isEmpty()
LongCollection
isEmpty in interface LongListisEmpty in class AbstractLongCollectionpublic boolean contains(long e)
LongCollection
contains in interface LongListcontains in class AbstractLongCollectionpublic LongIterator iterator()
LongCollection
iterator in interface LongListiterator in class AbstractLongCollectionpublic long[] toArray()
LongCollection
toArray in interface LongListtoArray in class AbstractLongCollectionpublic 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 LongListtoArray in class AbstractLongCollectionpublic boolean add(long e)
LongCollection
add in interface LongListadd in class AbstractLongCollectionpublic boolean remove(long e)
LongCollection
remove in interface LongListremove in class AbstractLongCollectionpublic boolean addAll(LongCollection c)
LongCollection
addAll in interface LongListaddAll in class AbstractLongCollection
public boolean addAll(int index,
LongCollection c)
addAll in interface LongListpublic void clear()
LongCollection
clear in interface LongListclear in class AbstractLongCollectionpublic boolean equals(java.lang.Object o)
equals in interface LongListpublic int hashCode()
hashCode in interface LongListpublic long getAt(int index)
LongList
getAt in interface LongListindex - the index to retrieve the value from.
public long setAt(int index,
long e)
LongList
setAt in interface LongListindex - the index to set the value at.e - the new value.
public void addAt(int index,
long e)
LongList
addAt in interface LongListindex - the index to add the value at.e - the new value.public long removeAt(int index)
LongList
removeAt in interface LongListindex - the index to remove the value from.
public int indexOf(long e)
LongList
indexOf in interface LongListe - the number to look for
public int lastIndexOf(long e)
LongList
lastIndexOf in interface LongListe - the number to look for
public LongListIterator listIterator()
listIterator in interface LongListpublic LongListIterator listIterator(int index)
listIterator in interface LongList
public LongList subList(int fromIndex,
int toIndex)
subList in interface LongListpublic long size64()
LongCollection
size64 in interface LongCollectionsize64 in class AbstractLongCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||