Package | Description |
---|---|
org.organicdesign.fp.collections |
Type-safe versions of immutable collections (mostly from Clojure), plus unmodifiable and
immutable collection interfaces that fit these collections into the java.util interfaces.
|
org.organicdesign.fp.xform |
Immutable descriptions of data transformations (Transformable), and a highly efficient
single-pass, short-circuiting implementation that carries out those transforms in a single pass
(Xform).
|
Modifier and Type | Interface and Description |
---|---|
interface |
BaseList<E>
Adds copy-on-write, "fluent interface" methods to
UnmodList . |
interface |
BaseMap<K,V>
Adds copy-on-write, "fluent interface" methods to
UnmodMap . |
interface |
BaseSet<E>
Adds copy-on-write, "fluent interface" methods to
UnmodSet . |
interface |
BaseUnsortedMap<K,V>
Adds
BaseUnsortedMap.equator() to BaseMap which is an unsorted-only operation. |
interface |
ImList<E>
Immutable copy-on-write list
|
interface |
ImMap<K,V>
An immutable map with no guarantees about its ordering.
|
interface |
ImSet<E>
An immutable set with no guarantees about its ordering
|
interface |
ImSortedMap<K,V>
An immutable sorted map.
|
interface |
ImSortedSet<E>
An immutable sorted set interface
|
interface |
MutableList<E>
|
interface |
MutableUnsortedMap<K,V>
Interface for mutable (hash) map builder.
|
interface |
MutableUnsortedSet<E>
Interface for mutable (hash) set builder.
|
interface |
UnmodCollection<E>
Don't implement this interface directly if you don't have to.
|
interface |
UnmodIterable<T>
An unmodifiable Iterable, without any guarantee about order.
|
interface |
UnmodList<E>
Formalizes the return type of
Collections.unmodifiableList(List) , deprecating
mutator methods and implementing them to throw exceptions. |
interface |
UnmodMap<K,V>
An unmodifiable map.
|
interface |
UnmodSet<E>
An unmodifiable set
|
interface |
UnmodSortedCollection<E> |
interface |
UnmodSortedIterable<T>
An unmodifiable Iterable, with guaranteed order.
|
interface |
UnmodSortedMap<K,V>
An unmodifiable SortedMap.
|
interface |
UnmodSortedSet<E>
An unmodifiable SortedSet.
|
Modifier and Type | Class and Description |
---|---|
class |
PersistentHashMap<K,V>
Rich Hickey's immutable rendition of Phil Bagwell's Hash Array Mapped Trie.
|
static class |
PersistentHashMap.MutableHashMap<K,V> |
class |
PersistentHashSet<E>
A wrapper that turns a PersistentTreeMap into a set.
|
static class |
PersistentHashSet.MutableHashSet<E> |
class |
PersistentTreeMap<K,V>
Persistent Red Black Tree.
|
class |
PersistentTreeSet<E>
A wrapper that turns a PersistentTreeMap into a set.
|
class |
PersistentVector<E>
This started out as Rich Hickey's PersistentVector class from Clojure in late 2014.
|
static class |
PersistentVector.MutableVector<F> |
class |
RangeOfInt
An efficient (in both time and memory) implementation of List.
|
class |
RrbTree<E>
This is based on the paper, "RRB-Trees: Efficient Immutable Vectors" by Phil Bagwell and
Tiark Rompf, with the following differences:
|
static class |
RrbTree.ImRrbt<E>
Immutable version of an
RrbTree |
static class |
RrbTree.MutableRrbt<E>
Mutable version of an
RrbTree |
static class |
UnmodIterable.AbstractUnmodIterable<T>
Implements equals and hashCode() methods compatible with all java.util collections (this
algorithm is not order-dependent) and toString which takes the name of the sub-class.
|
static class |
UnmodList.AbstractUnmodList<E>
Implements equals and hashCode() methods compatible with java.util.List (which ignores order)
to make defining unmod lists easier.
|
static class |
UnmodMap.AbstractUnmodMap<K,V>
Implements equals and hashCode() methods compatible with java.util.Map (which ignores order)
to make defining unmod Maps easier.
|
static class |
UnmodSet.AbstractUnmodSet<T>
Implements equals and hashCode() methods compatible with java.util.Set (which ignores order)
to make defining unmod sets easier, especially for implementing Map.keySet() and such.
|
Modifier and Type | Class and Description |
---|---|
class |
Xform<A>
An immutable description of operations to be performed (a transformation, transform, or x-form).
|
Modifier and Type | Method and Description |
---|---|
Transformable<T> |
Transformable.concat(Iterable<? extends T> list)
Add items to the end of this Transformable (precat() adds to the beginning)
|
Transformable<T> |
Transformable.drop(long numItems)
Ignore the first n items and return only those that come after.
|
Transformable<T> |
Transformable.filter(Fn1<? super T,Boolean> predicate)
Return only the items for which the given predicate returns true.
|
<U> Transformable<U> |
Transformable.flatMap(Fn1<? super T,Iterable<U>> f)
Transform each item into zero or more new items using the given function.
|
<U> Transformable<U> |
Transformable.map(Fn1<? super T,? extends U> func)
Transform each item into exactly one new item using the given function.
|
Transformable<T> |
Transformable.precat(Iterable<? extends T> list)
Add items to the beginning of this Transformable ("precat" is a PREpending version of conCAT).
|
Transformable<T> |
Transformable.take(long numItems)
Return only the first n items.
|
Transformable<T> |
Transformable.takeWhile(Fn1<? super T,Boolean> predicate)
Return items from the beginning until the given predicate returns false.
|
Copyright © 2017. All rights reserved.