public static final class Conversions.WrappedLongArray
extends java.util.AbstractList<java.lang.Long>
implements java.util.RandomAccess
| Modifier | Constructor and Description |
|---|---|
protected |
WrappedLongArray(long[] array)
Internal constructor for
Conversions.WrappedLongArray. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object o) |
static Conversions.WrappedLongArray |
create(long[] array)
Creates a new
Conversions.WrappedLongArray that is backed by the given primitive array. |
java.lang.Long |
get(int index) |
int |
indexOf(java.lang.Object o) |
long[] |
internalToArray()
Returns the underlying array in an unsafe manner.
|
int |
lastIndexOf(java.lang.Object o) |
java.lang.Long |
set(int index,
java.lang.Long element) |
int |
size() |
add, add, addAll, clear, equals, hashCode, iterator, listIterator, listIterator, remove, removeRange, subListaddAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected WrappedLongArray(long[] array)
Conversions.WrappedLongArray.array - the to-be-wrapped array. May be null which will cause any method on the created
object to fail with a NullPointerException.@Pure public static Conversions.WrappedLongArray create(long[] array)
Conversions.WrappedLongArray that is backed by the given primitive array.array - the to-be-wrapped array. May be null which will cause any method on the resulting
object to fail.null.public java.lang.Long get(int index)
get in interface java.util.List<java.lang.Long>get in class java.util.AbstractList<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.java.lang.IndexOutOfBoundsExceptionpublic java.lang.Long set(int index,
java.lang.Long element)
set in interface java.util.List<java.lang.Long>set in class java.util.AbstractList<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.java.lang.ClassCastExceptionjava.lang.NullPointerExceptionjava.lang.IllegalArgumentExceptionjava.lang.IndexOutOfBoundsExceptionpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.List<java.lang.Long>indexOf in class java.util.AbstractList<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<java.lang.Long>lastIndexOf in class java.util.AbstractList<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Long>contains in interface java.util.List<java.lang.Long>contains in class java.util.AbstractCollection<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.public int size()
size in interface java.util.Collection<java.lang.Long>size in interface java.util.List<java.lang.Long>size in class java.util.AbstractCollection<java.lang.Long>java.lang.NullPointerException - if the wrapped array was null.public long[] internalToArray()
null if the list was created with a
null argument.