SortedMap interface.
| Modifier and Type | Field and Description |
|---|---|
| public static final long |
| Modifier and Type | Method and Description |
|---|---|
| public < key's component type of the map result K2, value's component type of the map result V2> SortedMap | Returns: a newSortedMapA comparator for keys of type K2 keyComparator, Function<? super K, ? extends K2> a keyMapper, Function<? super V, ? extends V2> Function that maps the keys of type K to keys of type K2a valueMapper)Function that the values of type V to values of type V2Same as |
| public <K2, V2> SortedMap | bimap(Function<? super K, ? extends K2>
a keyMapper, Function<? super V, ? extends V2> Function that maps the keys of type K to keys of type K2a valueMapper)Function that the values of type V to values of type V2Redeclares io. Maps this |
| public Tuple2 | computeIfAbsent(K
key whose presence in this map is to be tested key, Function<? super K, ? extends V> mapping function mappingFunction)Redeclares io. If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map. |
| public Tuple2 | computeIfPresent(K
key whose presence in this map is to be tested key, BiFunction<? super K, ? super V, ? extends V> remapping function remappingFunction)Redeclares io. If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value. |
| public SortedMap | distinct()
Redeclares io. Returns a new version of this which contains no duplicates. |
| public SortedMap | distinctBy(Comparator<? super Tuple2<K, V>>
A comparator comparator)Redeclares io. Returns a new version of this which contains no duplicates. |
| public <U> SortedMap | distinctBy(Function<? super Tuple2<K, V>, ? extends U>
A key extractor keyExtractor)Redeclares io. Returns a new version of this which contains no duplicates. |
| public SortedMap | drop(int
The number of elements to drop. n)Redeclares io. Drops the first n elements of this or all elements, if this length < n. |
| public SortedMap | dropRight(int
The number of elements to drop. n)Redeclares io. Drops the last n elements of this or all elements, if this length < n. |
| public SortedMap | dropUntil(Predicate<? super Tuple2<K, V>>
A condition tested subsequently for this elements. predicate)Redeclares io. Drops elements until the predicate holds for the current element. |
| public SortedMap | dropWhile(Predicate<? super Tuple2<K, V>>
A condition tested subsequently for this elements. predicate)Redeclares io. Drops elements while the predicate holds for the current element. |
| public SortedMap | filter(Predicate<? super Tuple2<K, V>>
A predicate predicate)Redeclares io. Returns a new traversable consisting of all elements which satisfy the given predicate. |
| public SortedMap | filter(BiPredicate<? super K, ? super V>
the predicate used to test elements predicate)Redeclares io. Returns a new Map consisting of all elements which satisfy the given predicate. |
| public SortedMap | filterKeys(Predicate<? super K>
the predicate used to test keys of elements predicate)Redeclares io. Returns a new Map consisting of all elements with keys which satisfy the given predicate. |
| public SortedMap | filterValues(Predicate<? super V>
the predicate used to test values of elements predicate)Redeclares io. Returns a new Map consisting of all elements with values which satisfy the given predicate. |
| public < New key type K2, New value type V2> SortedMap | Returns: A new Map instance containing mapped entriesA comparator for keys of type U keyComparator, BiFunction<? super K, ? super V, ? extends Iterable<Tuple2<K2, V2>>> A function which maps key/value pairs to Iterables map entries mapper)Same as |
| public <K2, V2> SortedMap | flatMap(BiFunction<? super K, ? super V, ? extends Iterable<Tuple2<K2, V2>>>
A mapper mapper)Redeclares io. FlatMaps this |
| public <C> Map | groupBy(Function<? super Tuple2<K, V>, ? extends C>
A function which classifies elements into classes classifier)Redeclares io. Groups this elements by classifying the elements. |
| public Iterator | grouped(int
a positive block size size)Redeclares io. Groups this |
| public SortedMap | init()
Redeclares io. Dual of tail(), returning all elements except the last. |
| public Option | initOption()
Redeclares io. Dual of tailOption(), returning all elements except the last as |
| public default boolean | isOrdered()
Overrides default io. Checks if this Traversable is ordered |
| public SortedSet | |
| public default Tuple2 | |
| public < key's component type of the map result K2, value's component type of the map result V2> SortedMap | Returns: a newSortedMapA comparator for keys of type U keyComparator, BiFunction<? super K, ? super V, Tuple2<K2, V2>> a mapper)Function that maps entries of type (K, V) to entries of type (K2, V2)Same as |
| public <K2, V2> SortedMap | map(BiFunction<? super K, ? super V, Tuple2<K2, V2>>
a mapper)Function that maps entries of type (K, V) to entries of type (K2, V2)Redeclares io. Maps the entries of this |
| public <K2> SortedMap | mapKeys(Function<? super K, ? extends K2>
a keyMapper)Function that maps keys of type V to keys of type V2Redeclares io. Maps the keys of this |
| public <K2> SortedMap | mapKeys(Function<? super K, ? extends K2>
a keyMapper, BiFunction<? super V, ? super V, ? extends V> Function that maps keys of type V to keys of type V2a valueMerge)BiFunction that merges valuesRedeclares io. Maps the keys of this |
| public <V2> SortedMap | mapValues(Function<? super V, ? extends V2>
a valueMapper)Function that maps values of type V to values of type V2Redeclares io. Maps the values of this |
| public SortedMap | merge(Map<? extends K, ? extends V>
the other map that)Redeclares io. Creates a new map which by merging the entries of |
| public <U extends V> SortedMap | merge(Map<? extends K, U>
the other map that, BiFunction<? super V, ? super U, ? extends V> the collision resolution function collisionResolution)Redeclares io. Creates a new map which by merging the entries of |
| public static < Key type K, Value type V> SortedMap | |
| public SortedMap | orElse(Iterable<? extends Tuple2<K, V>>
An alternative other)TraversableRedeclares io. Returns this |
| public SortedMap | orElse(Supplier<? extends Iterable<? extends Tuple2<K, V>>>
An alternative supplier)Traversable supplierRedeclares io. Returns this |
| public Tuple2 | partition(Predicate<? super Tuple2<K, V>>
A predicate which classifies an element if it is in the first or the second traversable. predicate)Redeclares io. Creates a partition of this |
| public SortedMap | peek(Consumer<? super Tuple2<K, V>>
The action that will be performed on the element(s). action)Redeclares io. Performs the given |
| public SortedMap | put(K
key with which the specified value is to be associated key, V value to be associated with the specified key value)Redeclares io. Associates the specified value with the specified key in this map. |
| public SortedMap | put(Tuple2<? extends K, ? extends V>
A Tuple2 containing the key and value entry)Redeclares io. Convenience method for |
| public <U extends V> SortedMap | put(K
key with which the specified value is to be associated key, U value to be associated with the specified key value, BiFunction<? super V, ? super U, ? extends V> function taking the old and new values and merging them. merge)Redeclares io. Associates the specified value with the specified key in this map. |
| public <U extends V> SortedMap | put(Tuple2<? extends K, U>
A Tuple2 containing the key and value entry, BiFunction<? super V, ? super U, ? extends V> function taking the old and new values and merging them. merge)Redeclares io. Convenience method for |
| public SortedMap | reject(Predicate<? super Tuple2<K, V>>
A predicate predicate)Redeclares io. Returns a new traversable consisting of all elements which do not satisfy the given predicate. |
| public SortedMap | reject(BiPredicate<? super K, ? super V>
the predicate used to test elements predicate)Redeclares io. Returns a new Map consisting of all elements which do not satisfy the given predicate. |
| public SortedMap | rejectKeys(Predicate<? super K>
the predicate used to test keys of elements predicate)Redeclares io. Returns a new Map consisting of all elements with keys which do not satisfy the given predicate. |
| public SortedMap | rejectValues(Predicate<? super V>
the predicate used to test values of elements predicate)Redeclares io. Returns a new Map consisting of all elements with values which do not satisfy the given predicate. |
| public SortedMap | remove(K
key whose mapping is to be removed from the map key)Redeclares io. Removes the mapping for a key from this map if it is present. |
| public SortedMap | removeAll(BiPredicate<? super K, ? super V>
the predicate used to test elements predicate)Redeclares io.
Deprecated
Returns a new Map consisting of all elements which do not satisfy the given predicate. |
| public SortedMap | removeAll(Iterable<? extends K>
keys are to be removed from the map keys)Redeclares io. Removes the mapping for a key from this map if it is present. |
| public SortedMap | removeKeys(Predicate<? super K>
the predicate used to test keys of elements predicate)Redeclares io.
Deprecated
Returns a new Map consisting of all elements with keys which do not satisfy the given predicate. |
| public SortedMap | removeValues(Predicate<? super V>
the predicate used to test values of elements predicate)Redeclares io.
Deprecated
Returns a new Map consisting of all elements with values which do not satisfy the given predicate. |
| public SortedMap | replace(K
the key of the element to be substituted. key, V the expected current value that the key is currently mapped to oldValue, V the new value to be associated with the key newValue)Redeclares io. Replaces the entry for the specified key only if currently mapped to the specified value. |
| public SortedMap | replace(Tuple2<K, V>
An element to be substituted. currentElement, Tuple2<K, V> A replacement for currentElement. newElement)Redeclares io. Replaces the first occurrence (if exists) of the given currentElement with newElement. |
| public SortedMap | replaceAll(BiFunction<? super K, ? super V, ? extends V>
function transforming key and current value to a new value function)Redeclares io. Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception. |
| public SortedMap | replaceAll(Tuple2<K, V>
An element to be substituted. currentElement, Tuple2<K, V> A replacement for currentElement. newElement)Redeclares io. Replaces all occurrences of the given currentElement with newElement. |
| public SortedMap | replaceValue(K
the key of the element to be substituted. key, V the new value to be associated with the key value)Redeclares io. Replaces the entry for the specified key only if it is currently mapped to some value. |
| public SortedMap | retainAll(Iterable<? extends Tuple2<K, V>>
Elements to be kept. elements)Redeclares io. Keeps all occurrences of the given elements from this. |
| public SortedMap | scan(Tuple2<K, V>
neutral element for the operator op zero, BiFunction<? super Tuple2<K, V>, ? super Tuple2<K, V>, ? extends Tuple2<K, V>> the associative operator for the scan operation)Redeclares io. Computes a prefix scan of the elements of the collection. |
| public Iterator | slideBy(Function<? super Tuple2<K, V>, ?>
A function which classifies elements into classes classifier)Redeclares io. Slides a non-overlapping window of a variable size over this |
| public Iterator | sliding(int
a positive window size size)Redeclares io. Slides a window of a specific |
| public Iterator | sliding(int
a positive window size size, int a positive step size step)Redeclares io. Slides a window of a specific |
| public Tuple2 | span(Predicate<? super Tuple2<K, V>>
A predicate. predicate)Redeclares io. Returns a tuple where the first element is the longest prefix of elements that satisfy the given
|
| public SortedMap | |
| public Option | tailOption()
Redeclares io. Drops the first element of a non-empty Traversable and returns an |
| public SortedMap | take(int
The number of elements to take. n)Redeclares io. Takes the first n elements of this or all elements, if this length < n. |
| public SortedMap | takeRight(int
The number of elements to take. n)Redeclares io. Takes the last n elements of this or all elements, if this length < n. |
| public SortedMap | takeUntil(Predicate<? super Tuple2<K, V>>
A condition tested subsequently for this elements. predicate)Redeclares io. Takes elements until the predicate holds for the current element. |
| public SortedMap | takeWhile(Predicate<? super Tuple2<K, V>>
A condition tested subsequently for the contained elements. predicate)Redeclares io. Takes elements while the predicate holds for the current element. |
| public SortedMap | toJavaMap()
Redeclares io. Converts this Vavr |