public static final class Conversions.WrappedIntegerArray
extends java.util.AbstractList<java.lang.Integer>
implements java.util.RandomAccess
| Modifier | Constructor and Description |
|---|---|
protected |
WrappedIntegerArray(int[] array)
Internal constructor for
Conversions.WrappedIntegerArray. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object o) |
static Conversions.WrappedIntegerArray |
create(int[] array)
Creates a new
Conversions.WrappedIntegerArray that is backed by the given primitive array. |
java.lang.Integer |
get(int index) |
int |
indexOf(java.lang.Object o) |
int[] |
internalToArray()
Returns the underlying array in an unsafe manner.
|
int |
lastIndexOf(java.lang.Object o) |
java.lang.Integer |
set(int index,
java.lang.Integer 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 WrappedIntegerArray(int[] array)
Conversions.WrappedIntegerArray.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.WrappedIntegerArray create(int[] array)
Conversions.WrappedIntegerArray 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.Integer get(int index)
get in interface java.util.List<java.lang.Integer>get in class java.util.AbstractList<java.lang.Integer>java.lang.NullPointerException - if the wrapped array was null.java.lang.IndexOutOfBoundsExceptionpublic java.lang.Integer set(int index,
java.lang.Integer element)
set in interface java.util.List<java.lang.Integer>set in class java.util.AbstractList<java.lang.Integer>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.Integer>indexOf in class java.util.AbstractList<java.lang.Integer>java.lang.NullPointerException - if the wrapped array was null.public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<java.lang.Integer>lastIndexOf in class java.util.AbstractList<java.lang.Integer>java.lang.NullPointerException - if the wrapped array was null.public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Integer>contains in interface java.util.List<java.lang.Integer>contains in class java.util.AbstractCollection<java.lang.Integer>java.lang.NullPointerException - if the wrapped array was null.public int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.List<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>java.lang.NullPointerException - if the wrapped array was null.public int[] internalToArray()
null if the list was created with a
null argument.