|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.list.JImmutableArrayList<T>
T
- public class JImmutableArrayList<T>
JImmutableList implementation using 32-way trees. The underlying trees, like the JImmutableList, only allow values to be inserted or deleted from the head or tail of the list.
Nested Class Summary | |
---|---|
static class |
JImmutableArrayList.Builder<T>
|
Method Summary | ||
---|---|---|
JImmutableArrayList<T> |
assign(int index,
T value)
Replaces the value at the specified index (which must be within current bounds of the list) with the new value. |
|
static
|
builder()
|
|
void |
checkInvariants()
|
|
Cursor<T> |
cursor()
|
|
JImmutableArrayList<T> |
deleteAll()
|
|
JImmutableArrayList<T> |
deleteFirst()
Removes the first value from the list and reduces size by 1. |
|
JImmutableArrayList<T> |
deleteLast()
Removes the last value from the list and reduces size by 1. |
|
boolean |
equals(Object o)
|
|
T |
get(int index)
Retrieves the value at the specified index (which must be within the bounds of the list). |
|
List<T> |
getList()
Returns an unmodifiable List implementation backed by this list. |
|
int |
hashCode()
|
|
JImmutableArrayList<T> |
insert(Iterable<? extends T> values)
Adds the values to the end of the list in the same order they appear in the Iterable. |
|
JImmutableArrayList<T> |
insert(T value)
Adds a value to the end of the list. |
|
JImmutableArrayList<T> |
insertFirst(T value)
Adds a value to the front of the list. |
|
JImmutableArrayList<T> |
insertLast(T value)
Adds a value to the end of the list. |
|
boolean |
isEmpty()
|
|
Iterator<T> |
iterator()
|
|
static
|
of()
|
|
static
|
of(Indexed<? extends T> source,
int offset,
int limit)
|
|
static
|
of(Indexed<T> source)
|
|
int |
size()
Retrieve the number of values available in the container. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
@Nonnull public static <T> JImmutableArrayList<T> of()
@Nonnull public static <T> JImmutableArrayList<T> of(Indexed<? extends T> source, int offset, int limit)
@Nonnull public static <T> JImmutableArrayList<T> of(Indexed<T> source)
@Nonnull public static <T> JImmutableArrayList.Builder<T> builder()
public int size()
Indexed
size
in interface Indexed<T>
size
in interface JImmutableList<T>
public T get(int index)
JImmutableList
get
in interface Indexed<T>
get
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> assign(int index, @Nullable T value)
JImmutableList
assign
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> insert(@Nullable T value)
JImmutableList
insert
in interface Insertable<T>
insert
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> insert(@Nonnull Iterable<? extends T> values)
JImmutableList
insert
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> insertFirst(@Nullable T value)
JImmutableList
insertFirst
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> insertLast(@Nullable T value)
JImmutableList
insertLast
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> deleteFirst()
JImmutableList
deleteFirst
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> deleteLast()
JImmutableList
deleteLast
in interface JImmutableList<T>
public boolean isEmpty()
isEmpty
in interface JImmutableList<T>
@Nonnull public JImmutableArrayList<T> deleteAll()
deleteAll
in interface JImmutableList<T>
@Nonnull public List<T> getList()
JImmutableList
getList
in interface JImmutableList<T>
@Nonnull public Cursor<T> cursor()
cursor
in interface Cursorable<T>
public Iterator<T> iterator()
iterator
in interface Iterable<T>
public void checkInvariants()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |