org.joda.primitives.list
Interface PrimitiveList<E>

All Superinterfaces:
Collection<E>, Iterable<E>, List<E>, PrimitiveCollectable<E>, PrimitiveCollection<E>
All Known Subinterfaces:
BooleanList, ByteList, CharList, DoubleList, FloatList, IntList, LongList, ShortList
All Known Implementing Classes:
AbstractBooleanList, AbstractByteList, AbstractCharList, AbstractDoubleList, AbstractFloatList, AbstractIntList, AbstractLongList, AbstractShortList, ArrayBooleanList, ArrayByteList, ArrayCharList, ArrayDoubleList, ArrayFloatList, ArrayIntList, ArrayLongList, ArrayShortList, ImmutableArrayBooleanList, ImmutableArrayByteList, ImmutableArrayCharList, ImmutableArrayDoubleList, ImmutableArrayFloatList, ImmutableArrayIntList, ImmutableArrayLongList, ImmutableArrayShortList, StringBufferCharList, StringCharList

public interface PrimitiveList<E>
extends PrimitiveCollection<E>, List<E>

Base interface for all primitive list interfaces.

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.

Since:
1.0
Author:
Stephen Colebourne

Method Summary
 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).
 
Methods inherited from interface org.joda.primitives.collection.PrimitiveCollection
containsAny
 
Methods inherited from interface org.joda.primitives.PrimitiveCollectable
clear, clone, isEmpty, isModifiable, optimize, size
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

first

E first()
Gets the first list value.

Returns:
value at index zero, or null if the size is zero

last

E last()
Gets the last list value.

Returns:
value at index size() - 1 or null if the size is zero

removeRange

boolean removeRange(int fromIndexInclusive,
                    int toIndexExclusive)
Removes a range of values from the list (optional operation).

This method is optional, throwing an UnsupportedOperationException if the list cannot be modified.

Parameters:
fromIndexInclusive - the start of the range to remove, inclusive
toIndexExclusive - the end of the range to remove, exclusive
Returns:
true if the collection was modified
Throws:
IndexOutOfBoundsException - if the index is invalid
UnsupportedOperationException - if remove is not supported


Copyright © 2005-2010 Joda.org. All Rights Reserved.