public class VncTinyList extends VncList
Most of the lists in a typical Venice application have less than 5 items. This optimized implementation for an immutable tiny list is much faster than a VAVR persistent list that can hold an arbitrary number of items.
| Modifier and Type | Field and Description |
|---|---|
static VncTinyList |
EMPTY |
static int |
MAX_ELEMENTS |
static VncKeyword |
TYPE |
| Constructor and Description |
|---|
VncTinyList() |
VncTinyList(VncVal meta) |
| Modifier and Type | Method and Description |
|---|---|
VncList |
addAllAtEnd(VncSequence list) |
VncList |
addAllAtStart(VncSequence list,
boolean reverseAdd) |
VncList |
addAtEnd(VncVal val) |
VncList |
addAtStart(VncVal val) |
VncList |
butlast() |
int |
compareTo(VncVal o) |
java.lang.Object |
convertToJavaObject() |
VncList |
drop(int n) |
VncList |
dropWhile(java.util.function.Predicate<? super VncVal> predicate) |
VncList |
emptyWithMeta() |
boolean |
equals(java.lang.Object obj) |
VncList |
filter(java.util.function.Predicate<? super VncVal> predicate) |
VncVal |
first() |
void |
forEach(java.util.function.Consumer<? super VncVal> action) |
VncVal |
fourth() |
java.util.List<VncKeyword> |
getAllSupertypes() |
java.util.List<VncVal> |
getJavaList() |
VncKeyword |
getSupertype() |
VncKeyword |
getType() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<VncVal> |
iterator() |
VncVal |
last() |
VncList |
map(java.util.function.Function<? super VncVal,? extends VncVal> mapper) |
VncVal |
nth(int idx) |
VncVal |
nthOrDefault(int idx,
VncVal defaultVal) |
static VncTinyList |
of(VncVal... mvs) |
static VncTinyList |
ofArr(VncVal[] mvs,
VncVal meta) |
VncList |
removeAt(int idx) |
VncList |
rest() |
VncList |
reverse() |
VncVal |
second() |
VncList |
setAt(int idx,
VncVal val) |
VncList |
shuffle() |
int |
size() |
VncList |
slice(int start) |
VncList |
slice(int start,
int end) |
java.util.stream.Stream<VncVal> |
stream() |
VncList |
take(int n) |
VncList |
takeWhile(java.util.function.Predicate<? super VncVal> predicate) |
VncVal |
third() |
java.lang.String |
toString() |
java.lang.String |
toString(boolean print_readably) |
VncList |
toVncList() |
VncVector |
toVncVector() |
VncList |
withMeta(VncVal meta) |
VncList |
withValues(java.util.List<? extends VncVal> replaceVals) |
VncList |
withValues(java.util.List<? extends VncVal> replaceVals,
VncVal meta) |
empty, isVncList, ofAll, ofAll, ofColl, ofColl, ofList, ofList, typeRank, withVariadicValuesgetMeta, getMetaVal, getMetaVal, getWrappingTypeDef, isPrivate, isWrapped, wrappublic static final VncKeyword TYPE
public static final VncTinyList EMPTY
public static final int MAX_ELEMENTS
public VncTinyList()
public VncTinyList(VncVal meta)
public static VncTinyList of(VncVal... mvs)
public static VncTinyList ofArr(VncVal[] mvs, VncVal meta)
public VncList emptyWithMeta()
emptyWithMeta in class VncListpublic VncList withValues(java.util.List<? extends VncVal> replaceVals)
withValues in class VncListpublic VncList withValues(java.util.List<? extends VncVal> replaceVals, VncVal meta)
withValues in class VncListpublic VncKeyword getType()
public VncKeyword getSupertype()
getSupertype in class VncListpublic java.util.List<VncKeyword> getAllSupertypes()
getAllSupertypes in class VncListpublic java.util.Iterator<VncVal> iterator()
public void forEach(java.util.function.Consumer<? super VncVal> action)
public java.util.List<VncVal> getJavaList()
getJavaList in class VncListpublic VncVal nthOrDefault(int idx, VncVal defaultVal)
nthOrDefault in class VncListpublic VncVal second()
second in class VncSequencepublic VncVal third()
third in class VncSequencepublic VncVal fourth()
fourth in class VncSequencepublic VncVector toVncVector()
toVncVector in class VncListpublic VncList addAtStart(VncVal val)
addAtStart in class VncListpublic VncList addAllAtStart(VncSequence list, boolean reverseAdd)
addAllAtStart in class VncListpublic VncList addAllAtEnd(VncSequence list)
addAllAtEnd in class VncListpublic java.lang.Object convertToJavaObject()
convertToJavaObject in class VncListpublic int compareTo(VncVal o)