public static class CharBigLists.ListBigList extends AbstractCharBigList implements java.io.Serializable
AbstractCharBigList.CharSubList
Modifier and Type | Method and Description |
---|---|
boolean |
add(char key) |
void |
add(long index,
char key) |
boolean |
addAll(CharBigList c) |
boolean |
addAll(CharCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(java.util.Collection<? extends java.lang.Character> c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
CharBigList c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
CharCollection c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Character> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
void |
clear() |
boolean |
contains(char key) |
boolean |
containsAll(CharCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c)
Checks whether this collection contains all elements from the given collection.
|
char |
getChar(long index) |
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode() . |
long |
indexOf(char k) |
boolean |
isEmpty()
Checks whether the stack is empty.
|
CharBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(char k) |
CharBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
CharBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection.
|
char |
removeChar(long index) |
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
boolean |
retainAll(CharCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c)
Retains in this collection only elements from the given collection.
|
char |
set(long index,
char k) |
int |
size()
Deprecated.
|
void |
size(long size)
Sets the size of this big list.
|
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. |
<T> T[] |
toArray(T[] a)
Returns an containing the items of this collection;
the runtime type of the returned array is that of the specified array.
|
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection.
|
char[] |
toCharArray(char[] a)
Returns a primitive type array containing the items of this collection.
|
add, addAll, addElements, addElements, compareTo, equals, get, getChar, getElements, indexOf, lastIndexOf, listIterator, peek, peekChar, pop, popChar, push, push, rem, remove, remove, removeChar, set, set, size, top, topChar, toString
add, charIterator, contains, rem, remove, toArray, toArray
charIterator, toArray
public long size64()
Size64
@Deprecated public int size()
Size64
Integer.MAX_VALUE
.size
in interface Size64
size
in interface java.util.Collection<java.lang.Character>
size
in class AbstractCharBigList
Integer.MAX_VALUE
.Collection.size()
public void size(long size)
BigList
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
size
in interface BigList<java.lang.Character>
size
in class AbstractCharBigList
size
- the new size.public CharBigListIterator iterator()
CharCollection
Note that this specification strengthens the one given in
Iterable.iterator()
, which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection
.
iterator
in interface CharBigList
iterator
in interface CharCollection
iterator
in interface CharIterable
iterator
in interface java.lang.Iterable<java.lang.Character>
iterator
in interface java.util.Collection<java.lang.Character>
iterator
in class AbstractCharBigList
List.iterator()
public CharBigListIterator listIterator()
CharBigList
listIterator
in interface BigList<java.lang.Character>
listIterator
in interface CharBigList
listIterator
in class AbstractCharBigList
List.listIterator()
public boolean addAll(long index, java.util.Collection<? extends java.lang.Character> c)
BigList
addAll
in interface BigList<java.lang.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 CharBigListIterator listIterator(long index)
CharBigList
listIterator
in interface BigList<java.lang.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<java.lang.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 contains(char key)
contains
in interface CharCollection
contains
in class AbstractCharBigList
Collection.contains(Object)
public char[] toCharArray()
CharCollection
toCharArray
in interface CharCollection
toCharArray
in class AbstractCharCollection
Collection.toArray()
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 char[] toCharArray(char[] a)
CharCollection
Note that, contrarily to Collection.toArray(Object[])
, this
methods just writes all elements of this collection: no special
value will be added after the last one.
toCharArray
in interface CharCollection
toCharArray
in class AbstractCharCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public void add(long index, char key)
add
in interface CharBigList
add
in class AbstractCharBigList
List.add(int,Object)
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, CharBigList c)
AbstractCharBigList
addAll
in interface CharBigList
addAll
in class AbstractCharBigList
List.addAll(int,java.util.Collection)
public boolean add(char key)
add
in interface CharCollection
add
in class AbstractCharBigList
Collection.add(Object)
public boolean addAll(CharBigList c)
addAll
in interface CharBigList
addAll
in class AbstractCharBigList
List.addAll(int,java.util.Collection)
public char getChar(long index)
getChar
in interface CharBigList
BigList.get(long)
public long indexOf(char k)
indexOf
in interface CharBigList
indexOf
in class AbstractCharBigList
BigList.indexOf(Object)
public long lastIndexOf(char k)
lastIndexOf
in interface CharBigList
lastIndexOf
in class AbstractCharBigList
BigList.lastIndexOf(Object)
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 boolean addAll(CharCollection c)
AbstractCharCollection
addAll
in interface CharCollection
addAll
in class AbstractCharBigList
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean containsAll(CharCollection c)
AbstractCharCollection
containsAll
in interface CharCollection
containsAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean removeAll(CharCollection c)
AbstractCharCollection
removeAll
in interface CharCollection
removeAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(CharCollection c)
AbstractCharCollection
retainAll
in interface CharCollection
retainAll
in class AbstractCharCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public boolean isEmpty()
Stack
isEmpty
in interface Stack<java.lang.Character>
isEmpty
in interface java.util.Collection<java.lang.Character>
isEmpty
in class AbstractCharCollection
public <T> T[] toArray(T[] a)
CharCollection
Warning: Note that, contrarily to Collection.toArray(Object[])
, this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray
in interface CharCollection
toArray
in interface java.util.Collection<java.lang.Character>
toArray
in class AbstractCharCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean containsAll(java.util.Collection<?> c)
AbstractCharCollection
containsAll
in interface java.util.Collection<java.lang.Character>
containsAll
in class AbstractCharCollection
c
- a collection.true
if this collection contains all elements of the argument.public boolean addAll(java.util.Collection<? extends java.lang.Character> c)
AbstractCharBigList
addAll
in interface java.util.Collection<java.lang.Character>
addAll
in class AbstractCharBigList
c
- a collection.true
if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
AbstractCharCollection
removeAll
in interface java.util.Collection<java.lang.Character>
removeAll
in class AbstractCharCollection
c
- a collection.true
if this collection changed as a result of the call.public boolean retainAll(java.util.Collection<?> c)
AbstractCharCollection
retainAll
in interface java.util.Collection<java.lang.Character>
retainAll
in class AbstractCharCollection
c
- a collection.true
if this collection changed as a result of the call.public void clear()
clear
in interface java.util.Collection<java.lang.Character>
clear
in class java.util.AbstractCollection<java.lang.Character>
public int hashCode()
AbstractCharBigList
List.hashCode()
.hashCode
in interface java.util.Collection<java.lang.Character>
hashCode
in class AbstractCharBigList