public class TSynchronizedCharList extends TSynchronizedCharCollection implements TCharList
| Constructor and Description |
|---|
TSynchronizedCharList(TCharList list) |
TSynchronizedCharList(TCharList list,
java.lang.Object mutex) |
| 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(java.lang.Object o)
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 procedure)
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 condition)
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 condition)
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 index,
char element)
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(java.util.Random rand)
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 function)
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 TSynchronizedCharList(TCharList list)
public TSynchronizedCharList(TCharList list, java.lang.Object mutex)
public boolean equals(java.lang.Object o)
TCharCollectionequals in interface TCharCollectionequals in class java.lang.Objecto - object to be compared for equality with this collectionpublic int hashCode()
TCharCollectionObject.hashCode().hashCode in interface TCharCollectionhashCode in class java.lang.ObjectObject.equals(Object),
Collection.equals(Object)public char get(int index)
TCharListpublic char set(int index,
char element)
TCharListpublic void set(int offset,
char[] values)
TCharListpublic void set(int offset,
char[] values,
int valOffset,
int length)
TCharListpublic char replace(int offset,
char val)
TCharListpublic void remove(int offset,
int length)
TCharListpublic char removeAt(int offset)
TCharListpublic void add(char[] vals)
TCharListpublic void add(char[] vals,
int offset,
int length)
TCharListpublic void insert(int offset,
char value)
TCharListpublic void insert(int offset,
char[] values)
TCharListpublic void insert(int offset,
char[] values,
int valOffset,
int len)
TCharListpublic int indexOf(char o)
TCharListindexOf in interface TCharListo - an char valuefor faster searches on sorted listspublic int lastIndexOf(char o)
TCharListlastIndexOf in interface TCharListo - an char valuefor faster searches on sorted listspublic TCharList subList(int fromIndex, int toIndex)
TCharListpublic char[] toArray(int offset,
int len)
TCharListpublic char[] toArray(char[] dest,
int offset,
int len)
TCharListpublic char[] toArray(char[] dest,
int source_pos,
int dest_pos,
int len)
TCharListpublic int indexOf(int offset,
char value)
TCharListindexOf in interface TCharListoffset - the offset at which to start the linear search
(inclusive)value - an char valuefor faster searches on sorted listspublic int lastIndexOf(int offset,
char value)
TCharListlastIndexOf in interface TCharListoffset - the offset at which to start the linear search
(exclusive)value - an char valuefor faster searches on sorted listspublic void fill(char val)
TCharListpublic void fill(int fromIndex,
int toIndex,
char val)
TCharListpublic void reverse()
TCharListpublic void reverse(int from,
int to)
TCharListpublic void shuffle(java.util.Random rand)
TCharListpublic void sort()
TCharListpublic void sort(int fromIndex,
int toIndex)
TCharListpublic int binarySearch(char value)
TCharListbinarySearch in interface TCharListvalue - the value to search forpublic int binarySearch(char value,
int fromIndex,
int toIndex)
TCharListbinarySearch in interface TCharListvalue - the value to search forfromIndex - the lower boundary of the range (inclusive)toIndex - the upper boundary of the range (exclusive)public TCharList grep(TCharProcedure condition)
TCharListpublic TCharList inverseGrep(TCharProcedure condition)
TCharListgrep -v.inverseGrep in interface TCharListcondition - a condition to apply to each element in the listpublic char max()
TCharListpublic char min()
TCharListpublic char sum()
TCharListpublic boolean forEachDescending(TCharProcedure procedure)
TCharListforEachDescending in interface TCharListprocedure - a TCharProcedure valuepublic void transformValues(TCharFunction function)
TCharListtransformValues in interface TCharListfunction - a TCharFunction value