Package gnu.trove.list.linked
Class TCharLinkedList
java.lang.Object
gnu.trove.list.linked.TCharLinkedList
- All Implemented Interfaces:
gnu.trove.list.TCharList
,gnu.trove.TCharCollection
,Externalizable
,Serializable
A resizable, double linked list of char primitives.
- See Also:
-
Field Summary
Fields inherited from interface gnu.trove.TCharCollection
serialVersionUID
-
Constructor Summary
ConstructorsConstructorDescriptionTCharLinkedList
(char no_entry_value) TCharLinkedList
(gnu.trove.list.TCharList list) -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(char val) void
add
(char[] vals) void
add
(char[] vals, int offset, int length) boolean
addAll
(char[] array) boolean
addAll
(gnu.trove.TCharCollection collection) boolean
addAll
(Collection<? extends Character> collection) int
binarySearch
(char value) int
binarySearch
(char value, int fromIndex, int toIndex) void
clear()
boolean
contains
(char value) boolean
containsAll
(char[] array) boolean
containsAll
(gnu.trove.TCharCollection collection) boolean
containsAll
(Collection<?> collection) boolean
void
fill
(char val) void
fill
(int fromIndex, int toIndex, char val) boolean
forEach
(gnu.trove.procedure.TCharProcedure procedure) boolean
forEachDescending
(gnu.trove.procedure.TCharProcedure procedure) char
get
(int offset) gnu.trove.list.linked.TCharLinkedList.TCharLink
getLinkAt
(int offset) Returns the link at the given offset.char
gnu.trove.list.TCharList
grep
(gnu.trove.procedure.TCharProcedure condition) int
hashCode()
int
indexOf
(char value) int
indexOf
(int offset, char value) void
insert
(int offset, char value) void
insert
(int offset, char[] values) void
insert
(int offset, char[] values, int valOffset, int len) gnu.trove.list.TCharList
inverseGrep
(gnu.trove.procedure.TCharProcedure condition) boolean
isEmpty()
gnu.trove.iterator.TCharIterator
iterator()
int
lastIndexOf
(char value) int
lastIndexOf
(int offset, char value) char
max()
char
min()
void
boolean
remove
(char value) void
remove
(int offset, int length) boolean
removeAll
(char[] array) boolean
removeAll
(gnu.trove.TCharCollection collection) boolean
removeAll
(Collection<?> collection) char
removeAt
(int offset) char
replace
(int offset, char val) boolean
retainAll
(char[] array) boolean
retainAll
(gnu.trove.TCharCollection collection) boolean
retainAll
(Collection<?> collection) void
reverse()
void
reverse
(int from, int to) char
set
(int offset, char val) void
set
(int offset, char[] values) void
set
(int offset, char[] values, int valOffset, int length) void
int
size()
void
sort()
void
sort
(int fromIndex, int toIndex) gnu.trove.list.TCharList
subList
(int begin, int end) char
sum()
char[]
toArray()
char[]
toArray
(char[] dest) char[]
toArray
(char[] dest, int offset, int len) char[]
toArray
(char[] dest, int source_pos, int dest_pos, int len) char[]
toArray
(int offset, int len) toString()
void
transformValues
(gnu.trove.function.TCharFunction function) void
-
Constructor Details
-
TCharLinkedList
public TCharLinkedList() -
TCharLinkedList
public TCharLinkedList(char no_entry_value) -
TCharLinkedList
public TCharLinkedList(gnu.trove.list.TCharList list)
-
-
Method Details
-
getNoEntryValue
public char getNoEntryValue()- Specified by:
getNoEntryValue
in interfacegnu.trove.TCharCollection
- Specified by:
getNoEntryValue
in interfacegnu.trove.list.TCharList
-
size
public int size()- Specified by:
size
in interfacegnu.trove.TCharCollection
- Specified by:
size
in interfacegnu.trove.list.TCharList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfacegnu.trove.TCharCollection
- Specified by:
isEmpty
in interfacegnu.trove.list.TCharList
-
add
public boolean add(char val) - Specified by:
add
in interfacegnu.trove.TCharCollection
- Specified by:
add
in interfacegnu.trove.list.TCharList
-
add
public void add(char[] vals) - Specified by:
add
in interfacegnu.trove.list.TCharList
-
add
public void add(char[] vals, int offset, int length) - Specified by:
add
in interfacegnu.trove.list.TCharList
-
insert
public void insert(int offset, char value) - Specified by:
insert
in interfacegnu.trove.list.TCharList
-
insert
public void insert(int offset, char[] values) - Specified by:
insert
in interfacegnu.trove.list.TCharList
-
insert
public void insert(int offset, char[] values, int valOffset, int len) - Specified by:
insert
in interfacegnu.trove.list.TCharList
-
get
public char get(int offset) - Specified by:
get
in interfacegnu.trove.list.TCharList
-
getLinkAt
public gnu.trove.list.linked.TCharLinkedList.TCharLink getLinkAt(int offset) Returns the link at the given offset.
A simple bisection criteria is used to keep the worst case complexity equal to O(n/2) where n = size(). Simply start from head of list or tail depending on offset and list size.
- Parameters:
offset
- of the link- Returns:
- link or null if non-existent
-
set
public char set(int offset, char val) - Specified by:
set
in interfacegnu.trove.list.TCharList
-
set
public void set(int offset, char[] values) - Specified by:
set
in interfacegnu.trove.list.TCharList
-
set
public void set(int offset, char[] values, int valOffset, int length) - Specified by:
set
in interfacegnu.trove.list.TCharList
-
replace
public char replace(int offset, char val) - Specified by:
replace
in interfacegnu.trove.list.TCharList
-
clear
public void clear()- Specified by:
clear
in interfacegnu.trove.TCharCollection
- Specified by:
clear
in interfacegnu.trove.list.TCharList
-
remove
public boolean remove(char value) - Specified by:
remove
in interfacegnu.trove.TCharCollection
- Specified by:
remove
in interfacegnu.trove.list.TCharList
-
containsAll
- Specified by:
containsAll
in interfacegnu.trove.TCharCollection
-
containsAll
public boolean containsAll(gnu.trove.TCharCollection collection) - Specified by:
containsAll
in interfacegnu.trove.TCharCollection
-
containsAll
public boolean containsAll(char[] array) - Specified by:
containsAll
in interfacegnu.trove.TCharCollection
-
addAll
- Specified by:
addAll
in interfacegnu.trove.TCharCollection
-
addAll
public boolean addAll(gnu.trove.TCharCollection collection) - Specified by:
addAll
in interfacegnu.trove.TCharCollection
-
addAll
public boolean addAll(char[] array) - Specified by:
addAll
in interfacegnu.trove.TCharCollection
-
retainAll
- Specified by:
retainAll
in interfacegnu.trove.TCharCollection
-
retainAll
public boolean retainAll(gnu.trove.TCharCollection collection) - Specified by:
retainAll
in interfacegnu.trove.TCharCollection
-
retainAll
public boolean retainAll(char[] array) - Specified by:
retainAll
in interfacegnu.trove.TCharCollection
-
removeAll
- Specified by:
removeAll
in interfacegnu.trove.TCharCollection
-
removeAll
public boolean removeAll(gnu.trove.TCharCollection collection) - Specified by:
removeAll
in interfacegnu.trove.TCharCollection
-
removeAll
public boolean removeAll(char[] array) - Specified by:
removeAll
in interfacegnu.trove.TCharCollection
-
removeAt
public char removeAt(int offset) - Specified by:
removeAt
in interfacegnu.trove.list.TCharList
-
remove
public void remove(int offset, int length) - Specified by:
remove
in interfacegnu.trove.list.TCharList
-
transformValues
public void transformValues(gnu.trove.function.TCharFunction function) - Specified by:
transformValues
in interfacegnu.trove.list.TCharList
-
reverse
public void reverse()- Specified by:
reverse
in interfacegnu.trove.list.TCharList
-
reverse
public void reverse(int from, int to) - Specified by:
reverse
in interfacegnu.trove.list.TCharList
-
shuffle
- Specified by:
shuffle
in interfacegnu.trove.list.TCharList
-
subList
public gnu.trove.list.TCharList subList(int begin, int end) - Specified by:
subList
in interfacegnu.trove.list.TCharList
-
toArray
public char[] toArray()- Specified by:
toArray
in interfacegnu.trove.TCharCollection
- Specified by:
toArray
in interfacegnu.trove.list.TCharList
-
toArray
public char[] toArray(int offset, int len) - Specified by:
toArray
in interfacegnu.trove.list.TCharList
-
toArray
public char[] toArray(char[] dest) - Specified by:
toArray
in interfacegnu.trove.TCharCollection
- Specified by:
toArray
in interfacegnu.trove.list.TCharList
-
toArray
public char[] toArray(char[] dest, int offset, int len) - Specified by:
toArray
in interfacegnu.trove.list.TCharList
-
toArray
public char[] toArray(char[] dest, int source_pos, int dest_pos, int len) - Specified by:
toArray
in interfacegnu.trove.list.TCharList
-
forEach
public boolean forEach(gnu.trove.procedure.TCharProcedure procedure) - Specified by:
forEach
in interfacegnu.trove.TCharCollection
- Specified by:
forEach
in interfacegnu.trove.list.TCharList
-
forEachDescending
public boolean forEachDescending(gnu.trove.procedure.TCharProcedure procedure) - Specified by:
forEachDescending
in interfacegnu.trove.list.TCharList
-
sort
public void sort()- Specified by:
sort
in interfacegnu.trove.list.TCharList
-
sort
public void sort(int fromIndex, int toIndex) - Specified by:
sort
in interfacegnu.trove.list.TCharList
-
fill
public void fill(char val) - Specified by:
fill
in interfacegnu.trove.list.TCharList
-
fill
public void fill(int fromIndex, int toIndex, char val) - Specified by:
fill
in interfacegnu.trove.list.TCharList
-
binarySearch
public int binarySearch(char value) - Specified by:
binarySearch
in interfacegnu.trove.list.TCharList
-
binarySearch
public int binarySearch(char value, int fromIndex, int toIndex) - Specified by:
binarySearch
in interfacegnu.trove.list.TCharList
-
indexOf
public int indexOf(char value) - Specified by:
indexOf
in interfacegnu.trove.list.TCharList
-
indexOf
public int indexOf(int offset, char value) - Specified by:
indexOf
in interfacegnu.trove.list.TCharList
-
lastIndexOf
public int lastIndexOf(char value) - Specified by:
lastIndexOf
in interfacegnu.trove.list.TCharList
-
lastIndexOf
public int lastIndexOf(int offset, char value) - Specified by:
lastIndexOf
in interfacegnu.trove.list.TCharList
-
contains
public boolean contains(char value) - Specified by:
contains
in interfacegnu.trove.TCharCollection
- Specified by:
contains
in interfacegnu.trove.list.TCharList
-
iterator
public gnu.trove.iterator.TCharIterator iterator()- Specified by:
iterator
in interfacegnu.trove.TCharCollection
-
grep
public gnu.trove.list.TCharList grep(gnu.trove.procedure.TCharProcedure condition) - Specified by:
grep
in interfacegnu.trove.list.TCharList
-
inverseGrep
public gnu.trove.list.TCharList inverseGrep(gnu.trove.procedure.TCharProcedure condition) - Specified by:
inverseGrep
in interfacegnu.trove.list.TCharList
-
max
public char max()- Specified by:
max
in interfacegnu.trove.list.TCharList
-
min
public char min()- Specified by:
min
in interfacegnu.trove.list.TCharList
-
sum
public char sum()- Specified by:
sum
in interfacegnu.trove.list.TCharList
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
equals
-
hashCode
public int hashCode() -
toString
-