public static class CharLists.UnmodifiableList extends CharCollections.UnmodifiableCollection implements CharList, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
add(int i,
char k) |
void |
add(int i,
java.lang.Character k) |
boolean |
addAll(CharList l) |
boolean |
addAll(int index,
CharCollection c) |
boolean |
addAll(int index,
CharList l) |
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Character> c) |
void |
addElements(int index,
char[] a)
Add (hopefully quickly) elements to this type-specific list.
|
void |
addElements(int index,
char[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
CharListIterator |
charListIterator()
Deprecated.
|
CharListIterator |
charListIterator(int i)
Deprecated.
|
CharList |
charSubList(int from,
int to)
Deprecated.
|
int |
compareTo(java.util.List<? extends java.lang.Character> o) |
boolean |
equals(java.lang.Object o) |
java.lang.Character |
get(int i) |
char |
getChar(int i) |
void |
getElements(int from,
char[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array.
|
int |
hashCode() |
int |
indexOf(char k) |
int |
indexOf(java.lang.Object o) |
CharListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
int |
lastIndexOf(char k) |
int |
lastIndexOf(java.lang.Object o) |
CharListIterator |
listIterator()
Returns a type-specific list iterator on the list.
|
CharListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index.
|
java.lang.Character |
remove(int i) |
char |
removeChar(int i) |
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
char |
set(int i,
char k) |
java.lang.Character |
set(int index,
java.lang.Character k) |
void |
size(int size)
Sets the size of this list.
|
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, add, addAll, addAll, charIterator, clear, contains, contains, containsAll, containsAll, isEmpty, rem, remove, removeAll, removeAll, retainAll, retainAll, size, toArray, toArray, toArray, toCharArray, toCharArray, toString
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
addAll, charIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toArray, toCharArray, toCharArray
public char getChar(int i)
public char set(int i, char k)
public void add(int i, char k)
public char removeChar(int i)
removeChar
in interface CharList
List.remove(int)
public int indexOf(char k)
public int lastIndexOf(char k)
lastIndexOf
in interface CharList
List.lastIndexOf(Object)
public boolean addAll(int index, java.util.Collection<? extends java.lang.Character> c)
addAll
in interface java.util.List<java.lang.Character>
public void getElements(int from, char[] a, int offset, int length)
CharList
getElements
in interface CharList
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)
CharList
removeElements
in interface CharList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, char[] a, int offset, int length)
CharList
addElements
in interface CharList
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 void addElements(int index, char[] a)
CharList
addElements
in interface CharList
index
- the index at which to add elements.a
- the array containing the elements.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
.
public CharListIterator 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 CharCollection
iterator
in interface CharIterable
iterator
in interface CharList
iterator
in interface java.lang.Iterable<java.lang.Character>
iterator
in interface java.util.Collection<java.lang.Character>
iterator
in interface java.util.List<java.lang.Character>
iterator
in class CharCollections.UnmodifiableCollection
public CharListIterator listIterator()
CharList
listIterator
in interface CharList
listIterator
in interface java.util.List<java.lang.Character>
List.listIterator()
public CharListIterator listIterator(int i)
CharList
listIterator
in interface CharList
listIterator
in interface java.util.List<java.lang.Character>
List.listIterator(int)
@Deprecated public CharListIterator charListIterator()
CharList
charListIterator
in interface CharList
CharList.listIterator()
@Deprecated public CharListIterator charListIterator(int i)
CharList
charListIterator
in interface CharList
CharList.listIterator(int)
public CharList subList(int from, int to)
CharList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
@Deprecated public CharList charSubList(int from, int to)
CharList
from
, inclusive, to the index to
, exclusive.charSubList
in interface CharList
List.subList(int,int)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<java.lang.Character>
equals
in interface java.util.List<java.lang.Character>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<java.lang.Character>
hashCode
in interface java.util.List<java.lang.Character>
hashCode
in class java.lang.Object
public int compareTo(java.util.List<? extends java.lang.Character> o)
compareTo
in interface java.lang.Comparable<java.util.List<? extends java.lang.Character>>
public boolean addAll(int index, CharCollection c)
public boolean addAll(CharList l)
public boolean addAll(int index, CharList l)
public java.lang.Character get(int i)
get
in interface java.util.List<java.lang.Character>
public void add(int i, java.lang.Character k)
add
in interface java.util.List<java.lang.Character>
public java.lang.Character set(int index, java.lang.Character k)
set
in interface java.util.List<java.lang.Character>
public java.lang.Character remove(int i)
remove
in interface java.util.List<java.lang.Character>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<java.lang.Character>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<java.lang.Character>