|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.chars.AbstractCharCollection
it.unimi.dsi.fastutil.chars.AbstractCharList
it.unimi.dsi.fastutil.chars.CharLists.Singleton
An immutable class representing a type-specific singleton list.
This class may be useful to implement your own in case you subclass a type-specific list.
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
boolean |
add(char k)
|
void |
add(int i,
char k)
|
boolean |
addAll(CharCollection c)
Delegates to a more generic method. |
boolean |
addAll(CharList c)
Delegates to a more generic method. |
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
CharCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
CharList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
List c)
|
boolean |
addAll(List c)
|
CharListIterator |
charListIterator()
Delegates to the corresponding list-iterator method. |
CharListIterator |
charListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
CharList |
charSubList(int from,
int to)
|
void |
clear()
|
Object |
clone()
|
boolean |
contains(char k)
|
char |
getChar(int i)
|
boolean |
rem(char 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 |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection. |
boolean |
removeAll(Collection c)
Remove from this collection all elements in the given collection. |
char |
removeChar(int i)
|
boolean |
retainAll(CharCollection c)
Retains in this collection only elements from the given type-specific collection. |
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection. |
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharList |
add, addElements, addElements, charIterator, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekChar, pop, popChar, push, push, remove, removeElements, set, set, subList, top, topChar, toString |
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, toArray, toArray, toArray, toCharArray |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
add, contains, containsAll, isEmpty, iterator, remove, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection |
containsAll, toArray, toCharArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Field Detail |
public static final long serialVersionUID
Method Detail |
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 AbstractCharList
public boolean add(char k)
add
in interface CharCollection
add
in class AbstractCharCollection
public void add(int i, char k)
add
in interface CharList
add
in class AbstractCharList
public char getChar(int i)
getChar
in interface CharList
List.get(int)
public char removeChar(int i)
removeChar
in interface CharList
removeChar
in class AbstractCharList
public boolean contains(char k)
contains
in interface CharCollection
contains
in class AbstractCharList
public boolean addAll(CharList c)
AbstractCharList
addAll
in interface CharList
addAll
in class AbstractCharList
public boolean addAll(CharCollection c)
AbstractCharList
addAll
in interface CharCollection
addAll
in class AbstractCharList
public boolean addAll(int i, CharList c)
AbstractCharList
addAll
in interface CharList
addAll
in class AbstractCharList
public boolean addAll(int i, CharCollection c)
AbstractCharList
addAll
in interface CharList
addAll
in class AbstractCharList
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.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.public boolean addAll(List c)
public boolean addAll(Collection c)
AbstractCharList
addAll
in interface List
addAll
in class AbstractCharList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractCharList
public boolean removeAll(Collection c)
AbstractCharCollection
removeAll
in interface List
removeAll
in class AbstractCharCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractCharCollection
retainAll
in interface List
retainAll
in class AbstractCharCollection
c
- a collection.
true
if this collection changed as a result of the call.public char[] toCharArray()
CharCollection
toCharArray
in interface CharCollection
toCharArray
in class AbstractCharCollection
public CharListIterator charListIterator()
AbstractCharList
charListIterator
in interface CharList
charListIterator
in class AbstractCharList
public CharListIterator charListIterator(int i)
CharList
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
charListIterator
in interface CharList
List.listIterator(int)
public CharList charSubList(int from, int to)
charSubList
in interface CharList
charSubList
in class AbstractCharList
public int size()
size
in interface List
public void size(int size)
CharList
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 CharList
size
in class AbstractCharList
public void clear()
clear
in interface List
clear
in class AbstractCharCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |