public static class AbstractLongList.LongSubList extends AbstractLongList implements Serializable
AbstractLongList.LongSubList| Constructor and Description |
|---|
AbstractLongList.LongSubList(LongList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
long k) |
boolean |
add(long k) |
boolean |
addAll(int index,
Collection<? extends Long> c) |
boolean |
addAll(int index,
LongCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
LongList l)
Delegates to a more generic method.
|
void |
addElements(int index,
long[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
void |
getElements(int from,
long[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
long |
getLong(int index) |
LongListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(long k)
|
boolean |
remove(Object o)
Delegates to
rem(). |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
long |
removeLong(int index) |
long |
set(int index,
long k) |
int |
size() |
LongList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
add, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, longListIterator, longListIterator, longSubList, peek, peekLong, pop, popLong, push, push, remove, set, size, top, topLong, toStringadd, contains, containsAll, containsAll, isEmpty, longIterator, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, toLongArrayadd, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, longIterator, removeAll, retainAll, toArray, toArray, toLongArray, toLongArraypublic AbstractLongList.LongSubList(LongList l, int from, int to)
public boolean add(long k)
add in interface LongCollectionadd in interface LongListadd in class AbstractLongListCollection.add(Object)public void add(int index,
long k)
add in interface LongListadd in class AbstractLongListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Long> c)
addAll in interface List<Long>addAll in class AbstractLongListpublic long getLong(int index)
getLong in interface LongListList.get(int)public long removeLong(int index)
removeLong in interface LongListremoveLong in class AbstractLongListList.remove(int)public long set(int index,
long k)
set in interface LongListset in class AbstractLongListList.set(int,Object)public void clear()
clear in interface Collection<Long>clear in interface List<Long>clear in class AbstractCollection<Long>public int size()
size in interface Collection<Long>size in interface List<Long>size in class AbstractCollection<Long>public void getElements(int from,
long[] a,
int offset,
int length)
AbstractLongListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface LongListgetElements in class AbstractLongListfrom - the start index (inclusive).a - the destination array.offset - the offset into the destination array where to store the first element copied.length - the number of elements to be copied.public void removeElements(int from,
int to)
AbstractLongListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface LongListremoveElements in class AbstractLongListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
long[] a,
int offset,
int length)
AbstractLongListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface LongListaddElements in class AbstractLongListindex - the index at which to add elements.a - the array containing the elements.offset - the offset of the first element to add.length - the number of elements to add.public LongListIterator listIterator(int index)
LongListlistIterator in interface LongListlistIterator in interface List<Long>listIterator in class AbstractLongListList.listIterator(int)public LongList subList(int from, int to)
LongListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface LongListsubList in interface List<Long>subList in class AbstractLongListList.subList(int,int)public boolean rem(long k)
LongCollectionremove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().rem in interface LongCollectionrem in class AbstractLongListCollection.remove(Object)public boolean remove(Object o)
AbstractLongListrem().remove in interface Collection<Long>remove in interface List<Long>remove in class AbstractLongListpublic boolean addAll(int index,
LongCollection c)
AbstractLongListaddAll in interface LongListaddAll in class AbstractLongListList.add(int,Object)public boolean addAll(int index,
LongList l)
AbstractLongListaddAll in interface LongListaddAll in class AbstractLongListList.add(int,Object)