public class TUnmodifiableCharList extends TUnmodifiableCharCollectionimplements TCharList
| Constructor and Description |
|---|
TUnmodifiableCharList(TCharList
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(char[] vals)
Adds the values in the array
vals to the end of the list, in order.
|
void |
add(char[] vals, int offset, int length)
Adds a subset of the values in the array
vals to the end of the list, in order.
|
int |
binarySearch(char value)
Performs a binary search for
value in the entire list.
|
int |
binarySearch(char value, int fromIndex, int toIndex)
Performs a binary search for
value in the specified range.
|
boolean |
equals(Object
Compares the specified object with this collection for equality.
|
void |
fill(char val)
Fills every slot in the list with the specified value.
|
void |
fill(int fromIndex, int toIndex, char val)
Fills a range in the list with the specified value.
|
boolean |
forEachDescending(TCharProcedure
Applies the procedure to each value in the list in descending (back to front) order.
|
char |
get(int index)
Returns the value at the specified offset.
|
TCharList |
grep(TCharProcedure
Searches the list for values satisfying
condition in the manner of the *nix
grep utility.
|
int |
hashCode()
Returns the hash code value for this collection.
|
int |
indexOf(char o)
Searches the list front to back for the index of
value.
|
int |
indexOf(int offset, char value)
Searches the list front to back for the index of
value, starting at
offset.
|
void |
insert(int offset, char value)
Inserts
value into the list at
offset.
|
void |
insert(int offset, char[] values)
Inserts the array of
values into the list at
offset.
|
void |
insert(int offset, char[] values, int valOffset, int len)
Inserts a slice of the array of
values into the list at
offset.
|
TCharList |
inverseGrep(TCharProcedure
Searches the list for values which do
not satisfy
condition.
|
int |
lastIndexOf(char o)
Searches the list back to front for the last index of
value.
|
int |
lastIndexOf(int offset, char value)
Searches the list back to front for the last index of
value, starting at
offset.
|
char |
max()
Finds the maximum value in the list.
|
char |
min()
Finds the minimum value in the list.
|
void |
remove(int offset, int length)
Removes
length values from the list, starting at
offset
|
char |
removeAt(int offset)
Removes
value at a given offset from the list.
|
char |
replace(int offset, char val)
Sets the value at the specified offset and returns the previously stored value.
|
void |
reverse()
Reverse the order of the elements in the list.
|
void |
reverse(int from, int to)
Reverse the order of the elements in the range of the list.
|
char |
set(int offset, char val)
Sets the value at the specified offset.
|
void |
set(int offset, char[] values)
Replace the values in the list starting at
offset with the contents of the
values array.
|
void |
set(int offset, char[] values, int valOffset, int length)
Replace the values in the list starting at
offset with
length values from the
values array, starting at valOffset.
|
void |
shuffle(Random
Shuffle the elements of the list using the specified random number generator.
|
void |
sort()
Sort the values in the list (ascending) using the Sun quicksort implementation.
|
void |
sort(int fromIndex, int toIndex)
Sort a slice of the list (ascending) using the Sun quicksort implementation.
|
TCharList |
subList(int fromIndex, int toIndex)
Returns a sublist of this list.
|
char |
sum()
Calculates the sum of all the values in the list.
|
char[] |
toArray(char[] dest, int offset, int len)
Copies a slice of the list into a native array.
|
char[] |
toArray(char[] dest, int source_pos, int dest_pos, int len)
Copies a slice of the list into a native array.
|
char[] |
toArray(int offset, int len)
Copies a slice of the list into a native array.
|
void |
transformValues(TCharFunction
Transform each value in the list using the specified function.
|
add, addAll, addAll, addAll, clear, contains, containsAll, containsAll, containsAll, forEach, getNoEntryValue, isEmpty, iterator, remove, removeAll, removeAll, removeAll, retainAll, retainAll, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, clear, contains, forEach, getNoEntryValue, isEmpty, remove, size, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAll, containsAll, iterator, removeAll, removeAll, removeAll, retainAll, retainAll, retainAllpublic TUnmodifiableCharList(TCharListlist)
public boolean equals(Objecto)
TCharCollection
equals in interface
TCharCollection
equals in class
Object
o - object to be compared for equality with this collection
public int hashCode()
TCharCollection
Object.hashCode() .
hashCode in interface
TCharCollection
hashCode in class
Object
Object.equals(Object) ,
Collection.equals(Object)
public char get(int index)
TCharList
public int indexOf(char o)
TCharList
indexOf in interface
TCharList
o - an
char value
for faster searches on sorted lists
public int lastIndexOf(char o)
TCharList
lastIndexOf in interface
TCharList
o - an
char value
for faster searches on sorted lists
public char[] toArray(int offset,
int len)
TCharList
public char[] toArray(char[] dest,
int offset,
int len)
TCharList
public char[] toArray(char[] dest,
int source_pos,
int dest_pos,
int len)
TCharList
public boolean forEachDescending(TCharProcedureprocedure)
TCharList
forEachDescending in interface
TCharList
procedure - a
TCharProcedure value
public int binarySearch(char value)
TCharList
binarySearch in interface
TCharList
value - the value to search for
public int binarySearch(char value,
int fromIndex,
int toIndex)
TCharList
binarySearch in interface
TCharList
value - the value to search for
fromIndex - the lower boundary of the range (inclusive)
toIndex - the upper boundary of the range (exclusive)
public int indexOf(int offset,
char value)
TCharList
indexOf in interface
TCharList
offset - the offset at which to start the linear search (inclusive)
value - an
char value
for faster searches on sorted lists
public int lastIndexOf(int offset,
char value)
TCharList
lastIndexOf in interface
TCharList
offset - the offset at which to start the linear search (exclusive)
value - an
char value
for faster searches on sorted lists
public TCharListgrep(TCharProcedure condition)
TCharList
public TCharListinverseGrep(TCharProcedure condition)
TCharList
grep -v.
inverseGrep in interface
TCharList
condition - a condition to apply to each element in the list
public char max()
TCharList
public char min()
TCharList
public char sum()
TCharList
public TCharListsubList(int fromIndex, int toIndex)
TCharList
public void add(char[] vals)
TCharList
public void add(char[] vals,
int offset,
int length)
TCharList
public char removeAt(int offset)
TCharList
public void remove(int offset,
int length)
TCharList
public void insert(int offset,
char value)
TCharList
public void insert(int offset,
char[] values)
TCharList
public void insert(int offset,
char[] values,
int valOffset,
int len)
TCharList
public char set(int offset,
char val)
TCharList
public void set(int offset,
char[] values)
TCharList
public void set(int offset,
char[] values,
int valOffset,
int length)
TCharList
public char replace(int offset,
char val)
TCharList
public void transformValues(TCharFunctionfunction)
TCharList
transformValues in interface
TCharList
function - a
TCharFunction value
public void reverse()
TCharList
public void reverse(int from,
int to)
TCharList
public void shuffle(Randomrand)
TCharList
public void sort()
TCharList
sort in interface
TCharList
Arrays.sort(int[])
public void sort(int fromIndex,
int toIndex)
TCharList
sort in interface
TCharList
fromIndex - the index at which to start sorting (inclusive)
toIndex - the index at which to stop sorting (exclusive)
Arrays.sort(int[])
public void fill(char val)
TCharList
public void fill(int fromIndex,
int toIndex,
char val)
TCharList