IDiffList.Range| Modifier and Type | Method and Description |
|---|---|
IList<V> |
addFirst(V value) |
IList<V> |
addLast(V value) |
DiffList<V> |
clone() |
boolean |
equals(Object obj) |
IList<V> |
forked()
This returns a data structure which is forked, which is equivalent to Clojure's persistent
data structures, also sometimes called functional or immutable.
|
int |
hashCode() |
boolean |
isLinear() |
IList<V> |
linear()
This returns a data structure which is linear, or temporarily mutable.
|
IList<V> |
prefix() |
IList<V> |
removeFirst() |
IList<V> |
removeLast() |
IList<V> |
set(long idx,
V value) |
IList<V> |
slice(long start,
long end) |
IList<V> |
suffix() |
String |
toString() |
IList<V> |
underlying() |
IDiffList.Range |
underlyingSlice() |
finalize, getClass, notify, notifyAll, wait, wait, waitequals, first, last, save, split, spliterator, stream, toArray, toArray, toList, updatenthpublic IList<V> underlying()
underlying in interface IDiff<IList<V>,V>underlying in interface IDiffList<V>public IDiffList.Range underlyingSlice()
underlyingSlice in interface IDiffList<V>public IList<V> removeLast()
removeLast in interface IList<V>public IList<V> removeFirst()
removeFirst in interface IList<V>public IList<V> set(long idx, V value)
set in interface IList<V>idx overwritten with value. If idx is equal to ICollection.size(), the value is appended.public boolean isLinear()
public IList<V> forked()
ICollectionIf only a single function or scope uses the data structure, it can be left as a linear data structure, which can have significant performance benefits.
If the data structure is already forked, it will simply return itself.
public IList<V> linear()
ICollection
If ICollection.forked() is called on a linear collection, all references to that linear collection should be discarded.
If the data structure is already linear, it will simply return itself.