public static class AbstractCharList.CharSubList extends AbstractCharList implements Serializable
AbstractCharList.CharSubList| Constructor and Description |
|---|
CharSubList(CharList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
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<? extends Character> c) |
void |
addElements(int index,
char[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
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.
|
CharListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(char k)
|
boolean |
remove(Object o)
Delegates to
rem(). |
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() |
CharList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
add, addAll, addAll, addAll, addElements, charListIterator, charListIterator, charSubList, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekChar, pop, popChar, push, push, remove, set, size, top, topChar, toStringadd, charIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toCharArray, toCharArrayadd, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraycharIterator, containsAll, removeAll, retainAll, toArray, toArray, toCharArray, toCharArrayparallelStream, removeIf, streampublic CharSubList(CharList l, int from, int to)
public boolean add(char k)
add in interface CharCollectionadd in interface CharListadd in class AbstractCharListCollection.add(Object)public void add(int index,
char k)
add in interface CharListadd in class AbstractCharListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Character> c)
addAll in interface List<Character>addAll in class AbstractCharListpublic char getChar(int index)
getChar in interface CharListList.get(int)public char removeChar(int index)
removeChar in interface CharListremoveChar in class AbstractCharListList.remove(int)public char set(int index,
char k)
set in interface CharListset in class AbstractCharListList.set(int,Object)public void clear()
clear in interface Collection<Character>clear in interface List<Character>clear in class AbstractCollection<Character>public int size()
size in interface Collection<Character>size in interface List<Character>size in class AbstractCollection<Character>public void getElements(int from,
char[] a,
int offset,
int length)
AbstractCharListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface CharListgetElements in class AbstractCharListfrom - 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)
AbstractCharListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface CharListremoveElements in class AbstractCharListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
char[] a,
int offset,
int length)
AbstractCharListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface CharListaddElements in class AbstractCharListindex - 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 listIterator(int index)
CharListlistIterator in interface CharListlistIterator in interface List<Character>listIterator in class AbstractCharListList.listIterator(int)public CharList subList(int from, int to)
CharListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface CharListsubList in interface List<Character>subList in class AbstractCharListList.subList(int,int)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 AbstractCharListCollection.remove(Object)public boolean remove(Object o)
AbstractCharListrem().remove in interface Collection<Character>remove in interface List<Character>remove in class AbstractCharListpublic boolean addAll(int index,
CharCollection c)
AbstractCharListaddAll in interface CharListaddAll in class AbstractCharListList.add(int,Object)public boolean addAll(int index,
CharList l)
AbstractCharListaddAll in interface CharListaddAll in class AbstractCharListList.add(int,Object)