|
||||||||||
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.AbstractCharList.CharSubList
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.chars.AbstractCharList |
AbstractCharList.CharSubList |
Constructor Summary | |
AbstractCharList.CharSubList(CharList l,
int from,
int to)
|
Method Summary | |
boolean |
add(char k)
|
void |
add(int index,
char k)
|
boolean |
addAll(int index,
CharCollection c)
Delegates to a more generic method. |
boolean |
addAll(int index,
CharList l)
Delegates to a more generic method. |
boolean |
addAll(int index,
Collection c)
|
void |
addElements(int index,
char[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one. |
CharListIterator |
charListIterator(int index)
Returns a type-specific list iterator on the list starting at a given index. |
CharList |
charSubList(int from,
int to)
|
void |
clear()
|
char |
getChar(int index)
|
void |
getElements(int from,
char[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one. |
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. |
char |
removeChar(int index)
|
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one. |
char |
set(int index,
char k)
|
int |
size()
|
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharList |
add, addAll, addAll, addAll, addElements, charIterator, charListIterator, compareTo, contains, equals, get, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekChar, pop, popChar, push, push, remove, set, size, subList, top, topChar, toString |
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toCharArray, 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, removeAll, retainAll, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection |
containsAll, removeAll, retainAll, toArray, toCharArray, toCharArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Constructor Detail |
public AbstractCharList.CharSubList(CharList l, int from, int to)
Method Detail |
public boolean add(char k)
add
in interface CharCollection
add
in class AbstractCharList
public void add(int index, char k)
add
in interface CharList
add
in class AbstractCharList
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class AbstractCharList
public boolean addAll(int index, CharCollection c)
AbstractCharList
addAll
in interface CharList
addAll
in class AbstractCharList
public boolean addAll(int index, CharList l)
AbstractCharList
addAll
in interface CharList
addAll
in class AbstractCharList
public char getChar(int index)
getChar
in interface CharList
List.get(int)
public char removeChar(int index)
removeChar
in interface CharList
removeChar
in class AbstractCharList
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 char set(int index, char k)
set
in interface CharList
set
in class AbstractCharList
public void clear()
clear
in interface List
clear
in class AbstractCharCollection
public int size()
size
in interface List
public void getElements(int from, char[] a, int offset, int length)
AbstractCharList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface CharList
getElements
in class AbstractCharList
from
- the start index (inclusive).a
- the destination array.offset
- the offset into the destination array where to store the first element copied.length
- the number of elements to be copied.public void removeElements(int from, int to)
AbstractCharList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface CharList
removeElements
in class AbstractCharList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, char[] a, int offset, int length)
AbstractCharList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface CharList
addElements
in class AbstractCharList
index
- the index at which to add elements.a
- the array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.public CharListIterator charListIterator(int index)
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
charListIterator
in class AbstractCharList
public CharList charSubList(int from, int to)
charSubList
in interface CharList
charSubList
in class AbstractCharList
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |