Package | Description |
---|---|
javaslang | |
javaslang.collection |
Purely functional collections based on Traversable.
|
Modifier and Type | Method and Description |
---|---|
default <K,V> Map<K,V> |
Value.toMap(Function<? super T,? extends Tuple2<? extends K,? extends V>> f)
Converts this to a
Map . |
Modifier and Type | Interface and Description |
---|---|
interface |
SortedMap<K,V>
An immutable
SortedMap interface. |
Modifier and Type | Class and Description |
---|---|
class |
HashMap<K,V>
An immutable
HashMap implementation based on a
Hash array mapped trie (HAMT). |
class |
LinkedHashMap<K,V>
An immutable
LinkedHashMap implementation. |
class |
TreeMap<K,V>
SortedMap implementation, backed by a Red/Black Tree.
|
Modifier and Type | Method and Description |
---|---|
<K2,V2> Map<K2,V2> |
Map.bimap(Function<? super K,? extends K2> keyMapper,
Function<? super V,? extends V2> valueMapper)
Maps this
Map to a new Map with different component type by applying a function to its elements. |
Map<K,V> |
Map.distinct() |
Map<K,V> |
Map.distinctBy(Comparator<? super Tuple2<K,V>> comparator) |
<U> Map<K,V> |
Map.distinctBy(Function<? super Tuple2<K,V>,? extends U> keyExtractor) |
Map<K,V> |
Map.drop(long n) |
Map<K,V> |
Map.dropRight(long n) |
Map<K,V> |
Map.dropUntil(Predicate<? super Tuple2<K,V>> predicate) |
Map<K,V> |
Map.dropWhile(Predicate<? super Tuple2<K,V>> predicate) |
Map<K,V> |
Map.filter(Predicate<? super Tuple2<K,V>> predicate) |
<K2,V2> Map<K2,V2> |
Map.flatMap(BiFunction<? super K,? super V,? extends Iterable<Tuple2<K2,V2>>> mapper)
FlatMaps this
Map to a new Map with different component type. |
<C> Map<C,CharSeq> |
CharSeq.groupBy(Function<? super Character,? extends C> classifier) |
<C> Map<C,Vector<T>> |
Vector.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,TreeSet<T>> |
TreeSet.groupBy(Function<? super T,? extends C> classifier) |
default <C> Map<C,Seq<T>> |
Tree.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends Traversable<T>> |
Traversable.groupBy(Function<? super T,? extends C> classifier)
Groups this elements by classifying the elements.
|
default <C> Map<C,Stream<T>> |
Stream.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends SortedSet<T>> |
SortedSet.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends Set<T>> |
Set.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends Seq<T>> |
Seq.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,Queue<T>> |
Queue.groupBy(Function<? super T,? extends C> classifier) |
default <C> Map<C,List<T>> |
List.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,LinkedHashSet<T>> |
LinkedHashSet.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends LinearSeq<T>> |
LinearSeq.groupBy(Function<? super T,? extends C> classifier) |
default <C> Map<C,Iterator<T>> |
Iterator.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends IndexedSeq<T>> |
IndexedSeq.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,HashSet<T>> |
HashSet.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,Array<T>> |
Array.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends SortedMap<K,V>> |
SortedMap.groupBy(Function<? super Tuple2<K,V>,? extends C> classifier) |
<C> Map<C,? extends Map<K,V>> |
Map.groupBy(Function<? super Tuple2<K,V>,? extends C> classifier) |
Map<K,V> |
Map.init() |
<K2,V2> Map<K2,V2> |
Map.map(BiFunction<? super K,? super V,Tuple2<K2,V2>> mapper)
Maps the entries of this
Map to form a new Map . |
<V2> Map<K,V2> |
Map.mapValues(Function<? super V,? extends V2> valueMapper)
Maps the values of this
Map while preserving the corresponding keys. |
Map<K,V> |
Map.merge(Map<? extends K,? extends V> that)
Creates a new map which by merging the entries of
this map and that map. |
<U extends V> |
Map.merge(Map<? extends K,U> that,
BiFunction<? super V,? super U,? extends V> collisionResolution)
Creates a new map which by merging the entries of
this map and that map. |
static <K,V> Map<K,V> |
Map.narrow(Map<? extends K,? extends V> map)
Narrows a widened
Map<? extends K, ? extends V> to Map<K, V>
by performing a type safe-cast. |
Map<K,V> |
Map.peek(Consumer<? super Tuple2<K,V>> action) |
Map<K,V> |
Map.put(K key,
V value)
Associates the specified value with the specified key in this map.
|
Map<K,V> |
Map.put(Tuple2<? extends K,? extends V> entry)
Convenience method for
put(entry._1, entry._2) . |
Map<K,V> |
Map.remove(K key)
Removes the mapping for a key from this map if it is present.
|
Map<K,V> |
Map.removeAll(Iterable<? extends K> keys)
Removes the mapping for a key from this map if it is present.
|
Map<K,V> |
Map.replace(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
Map<K,V> |
Map.replaceAll(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
Map<K,V> |
Map.retainAll(Iterable<? extends Tuple2<K,V>> elements) |
Map<K,V> |
Map.scan(Tuple2<K,V> zero,
BiFunction<? super Tuple2<K,V>,? super Tuple2<K,V>,? extends Tuple2<K,V>> operation) |
Map<K,V> |
Map.tail() |
Map<K,V> |
Map.take(long n) |
Map<K,V> |
Map.takeRight(long n) |
Map<K,V> |
Map.takeUntil(Predicate<? super Tuple2<K,V>> predicate) |
Map<K,V> |
Map.takeWhile(Predicate<? super Tuple2<K,V>> predicate) |
Modifier and Type | Method and Description |
---|---|
<C> Map<C,? extends Map<K,V>> |
Map.groupBy(Function<? super Tuple2<K,V>,? extends C> classifier) |
Iterator<? extends Map<K,V>> |
Map.grouped(long size) |
Option<? extends Map<K,V>> |
Map.initOption() |
Tuple2<? extends Map<K,V>,? extends Map<K,V>> |
Map.partition(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<? extends Map<K,V>,? extends Map<K,V>> |
Map.partition(Predicate<? super Tuple2<K,V>> predicate) |
Iterator<? extends Map<K,V>> |
Map.sliding(long size) |
Iterator<? extends Map<K,V>> |
Map.sliding(long size,
long step) |
Tuple2<? extends Map<K,V>,? extends Map<K,V>> |
Map.span(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<? extends Map<K,V>,? extends Map<K,V>> |
Map.span(Predicate<? super Tuple2<K,V>> predicate) |
Option<? extends Map<K,V>> |
Map.tailOption() |
Modifier and Type | Method and Description |
---|---|
SortedMap<K,V> |
SortedMap.merge(Map<? extends K,? extends V> that) |
Map<K,V> |
Map.merge(Map<? extends K,? extends V> that)
Creates a new map which by merging the entries of
this map and that map. |
<U extends V> |
SortedMap.merge(Map<? extends K,U> that,
BiFunction<? super V,? super U,? extends V> collisionResolution) |
<U extends V> |
Map.merge(Map<? extends K,U> that,
BiFunction<? super V,? super U,? extends V> collisionResolution)
Creates a new map which by merging the entries of
this map and that map. |
static <K,V> Map<K,V> |
Map.narrow(Map<? extends K,? extends V> map)
Narrows a widened
Map<? extends K, ? extends V> to Map<K, V>
by performing a type safe-cast. |
Modifier and Type | Method and Description |
---|---|
default <U> U |
Map.transform(Function<? super Map<K,V>,? extends U> f)
Transforms this
Map . |
Copyright © 2016. All Rights Reserved.