public static class AbstractShortBigList.ShortSubList extends AbstractShortBigList implements java.io.Serializable
AbstractShortBigList.ShortSubList
Constructor and Description |
---|
ShortSubList(ShortBigList l,
long from,
long to) |
Modifier and Type | Method and Description |
---|---|
void |
add(long index,
short k) |
boolean |
add(short k) |
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Short> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
boolean |
addAll(long index,
ShortCollection c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
ShortList l) |
void |
addElements(long index,
short[][] a,
long offset,
long length)
Adds elements to this type-specific big list one-by-one.
|
void |
clear() |
void |
getElements(long from,
short[][] a,
long offset,
long length)
Copies element of this type-specific big list into the given big array one-by-one.
|
short |
getShort(long index) |
ShortBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(short k)
Note that this method should be called
remove() , but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
boolean |
remove(java.lang.Object o)
Delegates to the type-specific
rem() method. |
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
short |
removeShort(long index) |
short |
set(long index,
short k) |
long |
size64()
Returns the size of this data structure as a long.
|
ShortBigList |
subList(long from,
long to)
Returns a type-specific view of the portion of this type-specific big list from the index
from , inclusive, to the index to , exclusive. |
add, addAll, addAll, addAll, addAll, addAll, addElements, compareTo, contains, equals, get, getShort, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekShort, pop, popShort, push, push, remove, remove, removeShort, set, set, size, size, size, top, topShort, toString
add, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, shortIterator, toArray, toArray, toArray, toShortArray, toShortArray
containsAll, removeAll, retainAll, shortIterator, toArray, toArray, toShortArray, toShortArray
public ShortSubList(ShortBigList l, long from, long to)
public boolean add(short k)
add
in interface ShortCollection
add
in class AbstractShortBigList
Collection.add(Object)
public void add(long index, short k)
add
in interface ShortBigList
add
in class AbstractShortBigList
List.add(int,Object)
public boolean addAll(long index, java.util.Collection<? extends java.lang.Short> c)
BigList
addAll
in interface BigList<java.lang.Short>
addAll
in class AbstractShortBigList
index
- index at which to insert the first element from the specified collection.c
- collection containing elements to be added to this big list.true
if this big list changed as a result of the callList.addAll(int, Collection)
public short getShort(long index)
getShort
in interface ShortBigList
BigList.get(long)
public short removeShort(long index)
removeShort
in interface ShortBigList
removeShort
in class AbstractShortBigList
BigList.remove(long)
public short set(long index, short k)
set
in interface ShortBigList
set
in class AbstractShortBigList
BigList.set(long,Object)
public void clear()
clear
in interface java.util.Collection<java.lang.Short>
clear
in class java.util.AbstractCollection<java.lang.Short>
public long size64()
Size64
public void getElements(long from, short[][] a, long offset, long length)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface ShortBigList
getElements
in class AbstractShortBigList
from
- the start index (inclusive).a
- the destination big array.offset
- the offset into the destination big array where to store the first element copied.length
- the number of elements to be copied.public void removeElements(long from, long to)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface ShortBigList
removeElements
in class AbstractShortBigList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(long index, short[][] a, long offset, long length)
AbstractShortBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface ShortBigList
addElements
in class AbstractShortBigList
index
- the index at which to add elements.a
- the big array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.public ShortBigListIterator listIterator(long index)
ShortBigList
listIterator
in interface BigList<java.lang.Short>
listIterator
in interface ShortBigList
listIterator
in class AbstractShortBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public ShortBigList subList(long from, long to)
ShortBigList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long)
.
subList
in interface BigList<java.lang.Short>
subList
in interface ShortBigList
subList
in class AbstractShortBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean rem(short k)
ShortCollection
remove()
, 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 ShortCollection
rem
in class AbstractShortBigList
Collection.remove(Object)
public boolean remove(java.lang.Object o)
AbstractShortCollection
rem()
method.remove
in interface java.util.Collection<java.lang.Short>
remove
in class AbstractShortCollection
public boolean addAll(long index, ShortCollection c)
AbstractShortBigList
addAll
in interface ShortBigList
addAll
in class AbstractShortBigList
List.addAll(int,java.util.Collection)
public boolean addAll(long index, ShortList l)