public static class AbstractCharBigList.CharSubList extends AbstractCharBigList implements Serializable
AbstractCharBigList.CharSubList
Constructor and Description |
---|
AbstractCharBigList.CharSubList(CharBigList l,
long from,
long to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(char k) |
void |
add(long index,
char k) |
boolean |
addAll(long index,
CharCollection c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
CharList l) |
boolean |
addAll(long index,
Collection<? extends Character> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
void |
addElements(long index,
char[][] a,
long offset,
long length)
Adds elements to this type-specific big list one-by-one.
|
void |
clear() |
char |
getChar(long index) |
void |
getElements(long from,
char[][] a,
long offset,
long length)
Copies element of this type-specific big list into the given big array one-by-one.
|
CharBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(char k)
|
boolean |
remove(Object o)
Delegates to the type-specific
rem() method. |
char |
removeChar(long index) |
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
char |
set(long index,
char k) |
long |
size64()
Returns the size of this data structure as a long.
|
CharBigList |
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, getChar, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekChar, pop, popChar, push, push, remove, remove, removeChar, set, set, size, size, size, top, topChar, toString
add, charIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toCharArray, toCharArray
charIterator, containsAll, removeAll, retainAll, toArray, toArray, toCharArray, toCharArray
add, contains, containsAll, isEmpty, removeAll, retainAll, toArray
public AbstractCharBigList.CharSubList(CharBigList l, long from, long to)
public boolean add(char k)
add
in interface CharCollection
add
in class AbstractCharBigList
Collection.add(Object)
public void add(long index, char k)
add
in interface CharBigList
add
in class AbstractCharBigList
List.add(int,Object)
public boolean addAll(long index, Collection<? extends Character> c)
BigList
addAll
in interface BigList<Character>
addAll
in class AbstractCharBigList
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 char getChar(long index)
getChar
in interface CharBigList
BigList.get(long)
public char removeChar(long index)
removeChar
in interface CharBigList
removeChar
in class AbstractCharBigList
BigList.remove(long)
public char set(long index, char k)
set
in interface CharBigList
set
in class AbstractCharBigList
BigList.set(long,Object)
public void clear()
clear
in interface Collection<Character>
clear
in class AbstractCollection<Character>
public long size64()
Size64
public void getElements(long from, char[][] a, long offset, long length)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface CharBigList
getElements
in class AbstractCharBigList
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)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface CharBigList
removeElements
in class AbstractCharBigList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(long index, char[][] a, long offset, long length)
AbstractCharBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface CharBigList
addElements
in class AbstractCharBigList
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 CharBigListIterator listIterator(long index)
CharBigList
listIterator
in interface BigList<Character>
listIterator
in interface CharBigList
listIterator
in class AbstractCharBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public CharBigList subList(long from, long to)
CharBigList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long)
.
subList
in interface BigList<Character>
subList
in interface CharBigList
subList
in class AbstractCharBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean rem(char k)
CharCollection
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 CharCollection
rem
in class AbstractCharBigList
Collection.remove(Object)
public boolean remove(Object o)
AbstractCharCollection
rem()
method.remove
in interface Collection<Character>
remove
in class AbstractCharCollection
public boolean addAll(long index, CharCollection c)
AbstractCharBigList
addAll
in interface CharBigList
addAll
in class AbstractCharBigList
List.addAll(int,java.util.Collection)
public boolean addAll(long index, CharList l)