Package | Description |
---|---|
org.organicdesign.fp |
A data definition language, and other tools for writing functional Java.
|
org.organicdesign.fp.collections |
Type-safe versions of the immutable Clojure collections, plus unmodifiable and immutable
collection interfaces that extend the java.util collections, deprecating the mutate-in-place
methods (Unmod____) and adding methods that return a new, immutable, modified version of the
collection (Im____).
|
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 | Class and Description |
---|---|
static class |
FunctionUtils.UnmodifiableCollection<T>
Wraps a collection.
|
static class |
FunctionUtils.UnmodifiableList<T>
Wraps a list.
|
static class |
FunctionUtils.UnmodifiableMap<K,V>
Wraps a map.
|
static class |
FunctionUtils.UnmodifiableSet<T>
Wraps a set.
|
static class |
FunctionUtils.UnmodifiableSortedMap<K,V>
Wraps a sorted map.
|
static class |
FunctionUtils.UnmodifiableSortedSet<T>
Wraps a sorted set.
|
Modifier and Type | Method and Description |
---|---|
static <T> Transformable<T> |
StaticImports.xform(Iterable<T> iterable)
If you need to wrap a regular Java collection or other iterable outside this project to perform
a transformation on it, this method is the most convenient, efficient way to do so.
|
static <T> Transformable<T> |
StaticImports.xformArray(T... items)
If you need to wrap a regular Java array outside this project to perform
a transformation on it, this method is the most convenient, efficient way to do so.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ImList<E>
Holds Immutable "modification" methods that return a new ImList reflecting the modification while
sharing as much data structure with the previous ImList as possible (for performance).
|
interface |
ImMap<K,V>
An immutable map with no guarantees about its ordering.
|
interface |
ImMapTrans<K,V>
Deprecated.
|
interface |
ImSet<E>
An immutable set interface
|
interface |
ImSortedMap<K,V>
An immutable sorted map.
|
interface |
ImSortedSet<E>
An immutable sorted set interface
|
interface |
ImUnsortedMap<K,V>
Interface for unsorted (today that probably means "hash") maps.
|
interface |
ImUnsortedSet<E>
The super-interface of PersistentHashSet (excludes TreeSet).
|
interface |
MutableList<E>
You could think of this as a builder for an immutable map.
|
interface |
MutableUnsortedMap<K,V>
Interface for mutable (hash) map builder.
|
interface |
MutableUnsortedSet<E>
Declare your set as MutableUnsortedSet, call mutable(), build it, then call
mySet = mySet.immutable() without having to declare a new variable.
|
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>
An unmodifiable version of
List which formalizes the return type of
Collections.unmodifiableList() |
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.
|
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.Set (which ignores order)
to make defining unmod sets easier, especially for implementing Map.keySet() and such.
|
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 | Method and Description |
---|---|
static <T> ImList<T> |
PersistentVector.fromXform(Transformable<T> trans)
Deprecated.
|
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(Function1<? super T,Boolean> predicate)
Return only the items for which the given predicate returns true.
|
<U> Transformable<U> |
Transformable.flatMap(Function1<? super T,Iterable<U>> f)
Transform each item into zero or more new items using the given function.
|
<U> Transformable<U> |
Transformable.map(Function1<? 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(Function1<? super T,Boolean> predicate)
Return items from the beginning until the given predicate returns false.
|
Copyright © 2016. All rights reserved.