public interface PrimitiveList<E> extends PrimitiveCollection<E>, List<E>
This interface extends List
allowing seamless integration with other APIs.
All List methods can be used, using the primitive wrapper class.
However, it will be much more efficient to use the direct primitive methods
in the subinterface.
Modifier and Type | Method and Description |
---|---|
E |
first()
Gets the first list value.
|
E |
last()
Gets the last list value.
|
boolean |
removeRange(int fromIndexInclusive,
int toIndexExclusive)
Removes a range of values from the list (optional operation).
|
containsAny
clear, clone, isEmpty, isModifiable, optimize, size
E last()
size() - 1
or null if the size is zeroboolean removeRange(int fromIndexInclusive, int toIndexExclusive)
This method is optional, throwing an UnsupportedOperationException if the list cannot be modified.
fromIndexInclusive
- the start of the range to remove, inclusivetoIndexExclusive
- the end of the range to remove, exclusivetrue
if the collection was modifiedIndexOutOfBoundsException
- if the index is invalidUnsupportedOperationException
- if remove is not supportedCopyright © 2005-2012 Joda.org. All Rights Reserved.