Class DList<A>
java.lang.Object
fj.data.DList<A>
Difference List. It converts left associative appends into right associative ones to improve performance.
- Version:
- %build.number%
-
Method Summary
Modifier and TypeMethodDescriptionAppends two DLists together to produce a new DList.static <A> DList<A> arrayDList(A... as) Creates a DList from an arrayPrepends a single element on the DList to produce a new DList.static <A> DList<A> dlist(F<List<A>, Trampoline<List<A>>> f) Creates a DList from the function For alternatives functions to create a DList:static <A> DList<A> iterableDList(Iterable<A> it) Creates a DList from an Iterablestatic <A> DList<A> iteratorDList(Iterator<A> it) Creates a DList from an Iteratorstatic <A> DList<A> Creates a DList from a Liststatic <A> DList<A> nil()A empty DList.run()Concatenates all the internal Lists together that are held in the DList's lambda's state to produce a List.static <A> DList<A> single(A a) Produces a DList with one element.Appends a single element on the end of the DList to produce a new DList.Converts the DList to a standard java.util.List.
-
Method Details
-
dlist
Creates a DList from the function For alternatives functions to create a DList:- See Also:
-
listDList
-
iterableDList
-
iteratorDList
-
arrayDList
Creates a DList from an array -
run
-
toJavaList
-
nil
-
single
Produces a DList with one element.- Type Parameters:
A-- Parameters:
a- the element in the DList.- Returns:
- a DList with one element.
-
cons
-
snoc
-
append
-