add(Object), addAll(Collection), remove(Object), removeAll(Collection), etc. are not supported and will throw
an UnsupportedOperationException. In addition, the mutating iteration methods
removeIf(org.eclipse.collections.api.block.predicate.Predicate) and removeIfWith(org.eclipse.collections.api.block.predicate.Predicate2, Object) are not supported and will also
throw an UnsupportedOperationException.
The with(Object) method is not an exception to the above restrictions, as it will create a new
instance of this class with the existing contents plus the new item.
To create a wrapper around an existing array, use the adapt(Object[]) factory method. To wrap the contents
of an existing Collection instance, use the newArray(Iterable) or newArrayWithItem(Iterable, Object)
factory methods. To wrap existing objects in a new array, use one of the newArrayWith(Object) factory methods.
| Modifier and Type | Field and Description |
|---|---|
| private static final Object[] | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| EMPTY_ARRAY | back to summary |
|---|---|
| private static final Object[] EMPTY_ARRAY | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ArrayAdapter | back to summary |
|---|---|
| private ArrayAdapter(T[] newElements) | |
| adapt | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| clone | back to summary |
|---|---|
| public ArrayAdapter Overrides org. Implements org. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| newArray | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArray | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWith | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| newArrayWithItem | back to summary |
|---|---|
| public static <E> ArrayAdapter | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException | |
| set | back to summary |
|---|---|
| public T set(int index, T element) Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |
| sortThis | back to summary |
|---|---|
| public ArrayAdapter Overrides default org. Doc from org. Sorts the internal data structure of this list and returns the list itself as a convenience.
| |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a The
| |
| tap | back to summary |
|---|---|
| public FixedSizeList Overrides org. Overrides default org. Implements org. Doc from org. Executes the Procedure for each element in the iterable and returns Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
| |
| toReversed | back to summary |
|---|---|
| public FixedSizeList Overrides default org. Implements org. Doc from org. Returns a new MutableList in reverse order.
| |
| with | back to summary |
|---|---|
| public ArrayAdapter Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to add elements to their existing elements. A new instance
of
MutableCollection<String> list;
list = list.with("1");
list = list.with("2");
return list;
| |
| withAll | back to summary |
|---|---|
| public ArrayAdapter Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to add multiple elements to their existing elements. A new
instance of
MutableCollection<String> list;
list = list.withAll(FastList.newListWith("1", "2"));
return list;
| |
| without | back to summary |
|---|---|
| public ArrayAdapter Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to remove elements from their existing elements. A new
instance of
MutableCollection<String> list;
list = list.without("1");
list = list.without("2");
return list;
| |
| withoutAll | back to summary |
|---|---|
| public ArrayAdapter Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to remove multiple elements from their existing elements.
A new instance of
MutableCollection<String> list;
list = list.withoutAll(FastList.newListWith("1", "2"));
return list;
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream objectOutputStream) throws IOException | |