public class TSynchronizedByteList extends TSynchronizedByteCollectionimplements TByteList
| Constructor and Description |
|---|
TSynchronizedByteList(TByteList
|
TSynchronizedByteList(TByteList
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] vals)
Adds the values in the array
vals to the end of the list, in order.
|
void |
add(byte[] 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(byte value)
Performs a binary search for
value in the entire list.
|
int |
binarySearch(byte 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(byte val)
Fills every slot in the list with the specified value.
|
void |
fill(int fromIndex, int toIndex, byte val)
Fills a range in the list with the specified value.
|
boolean |
forEachDescending(TByteProcedure
Applies the procedure to each value in the list in descending (back to front) order.
|
byte |
get(int index)
Returns the value at the specified offset.
|
TByteList |
grep(TByteProcedure
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(byte o)
Searches the list front to back for the index of
value.
|
int |
indexOf(int offset, byte value)
Searches the list front to back for the index of
value, starting at
offset.
|
void |
insert(int offset, byte value)
Inserts
value into the list at
offset.
|
void |
insert(int offset, byte[] values)
Inserts the array of
values into the list at
offset.
|
void |
insert(int offset, byte[] values, int valOffset, int len)
Inserts a slice of the array of
values into the list at
offset.
|
TByteList |
inverseGrep(TByteProcedure
Searches the list for values which do
not satisfy
condition.
|
int |
lastIndexOf(byte o)
Searches the list back to front for the last index of
value.
|
int |
lastIndexOf(int offset, byte value)
Searches the list back to front for the last index of
value, starting at
offset.
|
byte |
max()
Finds the maximum value in the list.
|
byte |
min()
Finds the minimum value in the list.
|
void |
remove(int offset, int length)
Removes
length values from the list, starting at
offset
|
byte |
removeAt(int offset)
Removes
value at a given offset from the list.
|
byte |
replace(int offset, byte 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.
|
byte |
set(int index, byte element)
Sets the value at the specified offset.
|
void |
set(int offset, byte[] values)
Replace the values in the list starting at
offset with the contents of the
values array.
|
void |
set(int offset, byte[] 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.
|
TByteList |
subList(int fromIndex, int toIndex)
Returns a sublist of this list.
|
byte |
sum()
Calculates the sum of all the values in the list.
|
byte[] |
toArray(byte[] dest, int offset, int len)
Copies a slice of the list into a native array.
|
byte[] |
toArray(byte[] dest, int source_pos, int dest_pos, int len)
Copies a slice of the list into a native array.
|
byte[] |
toArray(int offset, int len)
Copies a slice of the list into a native array.
|
void |
transformValues(TByteFunction
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 TSynchronizedByteList(TByteListlist)
public boolean equals(Objecto)
TByteCollection
equals in interface
TByteCollection
equals in class
Object
o - object to be compared for equality with this collection
public int hashCode()
TByteCollection
Object.hashCode() .
hashCode in interface
TByteCollection
hashCode in class
Object
Object.equals(Object) ,
Collection.equals(Object)
public byte get(int index)
TByteList
public byte set(int index,
byte element)
TByteList
public void set(int offset,
byte[] values)
TByteList
public void set(int offset,
byte[] values,
int valOffset,
int length)
TByteList
public byte replace(int offset,
byte val)
TByteList
public void remove(int offset,
int length)
TByteList
public byte removeAt(int offset)
TByteList
public void add(byte[] vals)
TByteList
public void add(byte[] vals,
int offset,
int length)
TByteList
public void insert(int offset,
byte value)
TByteList
public void insert(int offset,
byte[] values)
TByteList
public void insert(int offset,
byte[] values,
int valOffset,
int len)
TByteList
public int indexOf(byte o)
TByteList
indexOf in interface
TByteList
o - an
byte value
for faster searches on sorted lists
public int lastIndexOf(byte o)
TByteList
lastIndexOf in interface
TByteList
o - an
byte value
for faster searches on sorted lists
public TByteListsubList(int fromIndex, int toIndex)
TByteList
public byte[] toArray(int offset,
int len)
TByteList
public byte[] toArray(byte[] dest,
int offset,
int len)
TByteList
public byte[] toArray(byte[] dest,
int source_pos,
int dest_pos,
int len)
TByteList
public int indexOf(int offset,
byte value)
TByteList
indexOf in interface
TByteList
offset - the offset at which to start the linear search (inclusive)
value - an
byte value
for faster searches on sorted lists
public int lastIndexOf(int offset,
byte value)
TByteList
lastIndexOf in interface
TByteList
offset - the offset at which to start the linear search (exclusive)
value - an
byte value
for faster searches on sorted lists
public void fill(byte val)
TByteList
public void fill(int fromIndex,
int toIndex,
byte val)
TByteList
public void reverse()
TByteList
public void reverse(int from,
int to)
TByteList
public void shuffle(Randomrand)
TByteList
public void sort()
TByteList
sort in interface
TByteList
Arrays.sort(int[])
public void sort(int fromIndex,
int toIndex)
TByteList
sort in interface
TByteList
fromIndex - the index at which to start sorting (inclusive)
toIndex - the index at which to stop sorting (exclusive)
Arrays.sort(int[])
public int binarySearch(byte value)
TByteList
binarySearch in interface
TByteList
value - the value to search for
public int binarySearch(byte value,
int fromIndex,
int toIndex)
TByteList
binarySearch in interface
TByteList
value - the value to search for
fromIndex - the lower boundary of the range (inclusive)
toIndex - the upper boundary of the range (exclusive)
public TByteListgrep(TByteProcedure condition)
TByteList
public TByteListinverseGrep(TByteProcedure condition)
TByteList
grep -v.
inverseGrep in interface
TByteList
condition - a condition to apply to each element in the list
public byte max()
TByteList
public byte min()
TByteList
public byte sum()
TByteList
public boolean forEachDescending(TByteProcedureprocedure)
TByteList
forEachDescending in interface
TByteList
procedure - a
TByteProcedure value
public void transformValues(TByteFunctionfunction)
TByteList
transformValues in interface
TByteList
function - a
TByteFunction value