Package | Description |
---|---|
org.organicdesign.fp |
A tiny data definition language for Java, in Java.
|
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 | Method and Description |
---|---|
static <K,V> ImSortedMap<K,V> |
StaticImports.sortedMap(Comparator<? super K> comp,
Iterable<Map.Entry<K,V>> kvPairs)
Returns a new PersistentTreeMap of the specified comparator and the given key/value pairs.
|
static <K extends Comparable<K>,V> |
StaticImports.sortedMap(Iterable<Map.Entry<K,V>> kvPairs)
Returns a new PersistentTreeMap of the given comparable keys and their paired values, sorted in
the default ordering of the keys.
|
Modifier and Type | Class and Description |
---|---|
class |
PersistentTreeMap<K,V>
Persistent Red Black Tree.
|
Modifier and Type | Method and Description |
---|---|
ImSortedMap<K,V> |
ImSortedMap.assoc(K key,
V val)
Returns a new map with the given key/value added.
|
default ImSortedMap<K,V> |
ImSortedMap.assoc(Map.Entry<K,V> entry)
Returns a new map with an immutable copy of the given entry added
|
default ImSortedMap<K,V> |
ImSortedMap.headMap(K toKey)
Return the elements in this map up (but excluding) to the given element
|
ImSortedMap<K,V> |
ImSortedMap.subMap(K fromKey,
K toKey)
Return the elements in this map from the start element (inclusive) to the end element
(exclusive)
|
ImSortedMap<K,V> |
PersistentTreeMap.subMap(K fromKey,
K toKey)
Return the elements in this map from the start element (inclusive) to the end element
(exclusive)
|
ImSortedMap<K,V> |
ImSortedMap.tailMap(K fromKey)
Return the elements in this from the given element to the end
|
ImSortedMap<K,V> |
PersistentTreeMap.tailMap(K fromKey)
Return the elements in this from the given element to the end
|
ImSortedMap<K,V> |
ImSortedMap.without(K key)
Returns a new map with the given key/value removed
|
Modifier and Type | Method and Description |
---|---|
static <T> PersistentTreeSet<T> |
PersistentTreeSet.ofMap(ImSortedMap<T,?> i)
Returns a new PersistentTreeSet of the keys and comparator in the given map.
|
Modifier and Type | Method and Description |
---|---|
default <K,V> ImSortedMap<K,V> |
Transformable.toImSortedMap(Comparator<? super K> comp,
Fn1<? super T,Map.Entry<K,V>> f1)
Realize an immutable, ordered (tree) map to quickly O(log2 n) look up values by key, but still
retrieve entries in key order.
|
Copyright © 2017. All rights reserved.