Package gnu.trove.decorator
Class TLongListDecorator
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Iterable<Long>,Collection<Long>,List<Long>,SequencedCollection<Long>
public class TLongListDecorator
extends AbstractList<Long>
implements List<Long>, Externalizable, Cloneable
Wrapper class to make a TLongList conform to the java.util.List API. This class simply decorates an underlying TLongList 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.
- See Also:
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionFOR EXTERNALIZATION ONLY!!TLongListDecorator(TLongList list) Creates a wrapper that decorates the specified primitive map. -
Method Summary
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, subList, toArray, toArray
-
Field Details
-
list
the wrapped primitive list
-
-
Constructor Details
-
TLongListDecorator
public TLongListDecorator()FOR EXTERNALIZATION ONLY!! -
TLongListDecorator
Creates a wrapper that decorates the specified primitive map.- Parameters:
list- the TLongList to wrap.
-
-
Method Details
-
getList
Returns a reference to the list wrapped by this decorator.- Returns:
- the wrapped TLongList instance.
-
size
public int size()- Specified by:
sizein interfaceCollection<Long>- Specified by:
sizein interfaceList<Long>- Specified by:
sizein classAbstractCollection<Long>
-
get
-
set
-
add
-
remove
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-