public abstract class TermValueList<T> extends Object implements List<String>
indexOf(Object) return value conforms to the contract of Arrays.binarySearch(Object[], Object)seal() is introduce to trim the List size, similar to ArrayList.trimToSize(), once it is called, no add should be performed.| Modifier and Type | Field and Description |
|---|---|
protected List<?> |
_innerList |
protected Class<T> |
_type |
| Modifier | Constructor and Description |
|---|---|
protected |
TermValueList() |
protected |
TermValueList(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
String element) |
abstract boolean |
add(String o)
Add a new value to the list.
|
boolean |
addAll(Collection<? extends String> c) |
boolean |
addAll(int index,
Collection<? extends String> c) |
protected abstract List<?> |
buildPrimitiveList(int capacity) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
abstract boolean |
containsWithType(T val) |
abstract String |
format(Object o) |
String |
get(int index) |
Comparable |
getComparableValue(int index) |
List<?> |
getInnerList()
The user of this method should not try to alter the content of the list,
which may result in data inconsistency.
|
T |
getRawValue(int index) |
Class<T> |
getType() |
abstract int |
indexOf(Object o) |
int |
indexOfWithOffset(Object value,
int offset) |
abstract int |
indexOfWithType(T o) |
boolean |
isEmpty() |
Iterator<String> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<String> |
listIterator() |
ListIterator<String> |
listIterator(int index) |
static void |
main(String[] args) |
String |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
abstract void |
seal() |
String |
set(int index,
String element) |
int |
size() |
List<String> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
protected TermValueList()
protected TermValueList(int capacity)
protected abstract List<?> buildPrimitiveList(int capacity)
public abstract void seal()
public List<?> getInnerList()
public abstract boolean add(String o)
public boolean addAll(Collection<? extends String> c)
public boolean addAll(int index,
Collection<? extends String> c)
public void clear()
public boolean contains(Object o)
public abstract boolean containsWithType(T val)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<String>containsAll in interface List<String>public T getRawValue(int index)
public Comparable getComparableValue(int index)
public int indexOfWithOffset(Object value, int offset)
public abstract int indexOfWithType(T o)
public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf in interface List<String>public ListIterator<String> listIterator()
listIterator in interface List<String>public ListIterator<String> listIterator(int index)
listIterator in interface List<String>public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
public static void main(String[] args)
Copyright © 2005–2013. All rights reserved.