public static class RrbTree.ImRrbt<E> extends RrbTree<E> implements ImList<E>, Serializable
RrbTree. Timing information is available there.RrbTree.ImRrbt<E>, RrbTree.MutableRrbt<E>UnmodList.AbstractUnmodList<E>| Modifier and Type | Method and Description |
|---|---|
RrbTree.ImRrbt<E> |
append(E val)
Adds one item to the end of the ImList.
|
RrbTree.ImRrbt<E> |
concat(Iterable<? extends E> es)
Efficiently adds items to the end of this ImList.
|
E |
get(int i) |
String |
indentedStr(int indent)
Returns a string where line breaks extend the given amount of indentation.
|
RrbTree.ImRrbt<E> |
insert(int idx,
E element)
Inserts an item in the RRB tree pushing the current element at that index and all subsequent
elements to the right.
|
UnmodSortedIterator<E> |
iterator()
A convenience method to get a listIterator.
|
RrbTree<E> |
join(RrbTree<E> that)
Joins the given tree to the right side of this tree (or this to the left side of that one)
in something like O(log n) time.
|
RrbTree.MutableRrbt<E> |
mutable()
Returns a mutable list (builder)
|
RrbTree.ImRrbt<E> |
replace(int index,
E item)
Replace the item at the given index.
|
int |
size()
Returns the number of items in this collection or iterable.
|
Tuple2<RrbTree.ImRrbt<E>,RrbTree.ImRrbt<E>> |
split(int splitIndex)
Divides this RRB-Tree such that every index less-than the given index ends up in the left-hand
tree and the indexed item and all subsequent ones end up in the right-hand tree.
|
String |
toString() |
RrbTree.ImRrbt<E> |
without(int index)
Returns a new RrbTree minus the given item (all items to the right are shifted left one)
This is O(log n).
|
empty, emptyMutable, equals, hashCodeclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, permutations, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, subList, toArray, toArrayequals, hashCode, spliteratorparallelStream, streamcastFromList, castFromSortedMap, castFromSortedSet, equaldrop, dropWhile, filter, flatMap, fold, foldUntil, hash, map, precat, take, takeWhile, toStringtoImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSetpublic RrbTree.ImRrbt<E> append(E val)
public RrbTree.ImRrbt<E> concat(Iterable<? extends E> es)
public E get(int i)
public RrbTree.ImRrbt<E> insert(int idx, E element)
public RrbTree.MutableRrbt<E> mutable()
public UnmodSortedIterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface List<E>iterator in interface UnmodCollection<E>iterator in interface UnmodIterable<E>iterator in interface UnmodList<E>iterator in interface UnmodSortedCollection<E>iterator in interface UnmodSortedIterable<E>iterator in class RrbTree<E>public RrbTree<E> join(RrbTree<E> that)
public RrbTree.ImRrbt<E> replace(int index, E item)
public RrbTree.ImRrbt<E> without(int index)
public int size()
RrbTreepublic Tuple2<RrbTree.ImRrbt<E>,RrbTree.ImRrbt<E>> split(int splitIndex)
public String indentedStr(int indent)
indentedStr in interface IndentedindentedStr in class RrbTree<E>indent - the amount of indent to start at. Pretty-printed subsequent lines may have
additional indent.Copyright © 2019. All rights reserved.