public class TShortListDecorator
extends java.util.AbstractList<java.lang.Short>
implements java.util.List<java.lang.Short>, java.io.Externalizable, java.lang.Cloneable
Wrapper class to make a TShortList conform to the java.util.List API. This class simply decorates an underlying TShortList and translates the Object-based APIs into their Trove primitive analogs.
Note that wrapping and unwrapping primitive values is extremely inefficient. If possible, users of this class should override the appropriate methods in this class and use a table of canonical values.
| Modifier and Type | Field and Description |
|---|---|
protected TShortList |
list
the wrapped primitive list
|
| Constructor and Description |
|---|
TShortListDecorator()
FOR EXTERNALIZATION ONLY!!
|
TShortListDecorator(TShortList list)
Creates a wrapper that decorates the specified primitive map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Short value) |
java.lang.Short |
get(int index) |
TShortList |
getList()
Returns a reference to the list wrapped by this decorator.
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.Short |
remove(int index) |
java.lang.Short |
set(int index,
java.lang.Short value) |
int |
size() |
void |
writeExternal(java.io.ObjectOutput out) |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected TShortList list
public TShortListDecorator()
public TShortListDecorator(TShortList list)
list - the TShortList to wrap.public TShortList getList()
public int size()
size in interface java.util.Collection<java.lang.Short>size in interface java.util.List<java.lang.Short>size in class java.util.AbstractCollection<java.lang.Short>public java.lang.Short get(int index)
get in interface java.util.List<java.lang.Short>get in class java.util.AbstractList<java.lang.Short>public java.lang.Short set(int index,
java.lang.Short value)
set in interface java.util.List<java.lang.Short>set in class java.util.AbstractList<java.lang.Short>public void add(int index,
java.lang.Short value)
add in interface java.util.List<java.lang.Short>add in class java.util.AbstractList<java.lang.Short>public java.lang.Short remove(int index)
remove in interface java.util.List<java.lang.Short>remove in class java.util.AbstractList<java.lang.Short>public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException