|
||||||||||
| 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)
CharCollectionremove(), 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 CharCollectionrem in class AbstractCharListpublic boolean add(char k)
add in interface CharCollectionadd in class AbstractCharCollection
public void add(int i,
char k)
add in interface CharListadd in class AbstractCharListpublic char getChar(int i)
getChar in interface CharListList.get(int)public char removeChar(int i)
removeChar in interface CharListremoveChar in class AbstractCharListpublic boolean contains(char k)
contains in interface CharCollectioncontains in class AbstractCharListpublic boolean addAll(CharList c)
AbstractCharList
addAll in interface CharListaddAll in class AbstractCharListpublic boolean addAll(CharCollection c)
AbstractCharList
addAll in interface CharCollectionaddAll in class AbstractCharList
public boolean addAll(int i,
CharList c)
AbstractCharList
addAll in interface CharListaddAll in class AbstractCharList
public boolean addAll(int i,
CharCollection c)
AbstractCharList
addAll in interface CharListaddAll in class AbstractCharListpublic boolean removeAll(CharCollection c)
AbstractCharCollection
removeAll in interface CharCollectionremoveAll in class AbstractCharCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(CharCollection c)
AbstractCharCollection
retainAll in interface CharCollectionretainAll in class AbstractCharCollectionc - 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 ListaddAll in class AbstractCharList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractCharListpublic boolean removeAll(Collection c)
AbstractCharCollection
removeAll in interface ListremoveAll in class AbstractCharCollectionc - a collection.
true if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractCharCollection
retainAll in interface ListretainAll in class AbstractCharCollectionc - a collection.
true if this collection changed as a result of the call.public char[] toCharArray()
CharCollection
toCharArray in interface CharCollectiontoCharArray in class AbstractCharCollectionpublic CharListIterator charListIterator()
AbstractCharList
charListIterator in interface CharListcharListIterator in class AbstractCharListpublic CharListIterator charListIterator(int i)
CharListThe 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 CharListList.listIterator(int)
public CharList charSubList(int from,
int to)
charSubList in interface CharListcharSubList in class AbstractCharListpublic int size()
size in interface Listpublic void size(int size)
CharListIf 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 CharListsize in class AbstractCharListpublic void clear()
clear in interface Listclear in class AbstractCharCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||