| Package | Description |
|---|---|
| net.automatalib.commons.util.mappings |
| Modifier and Type | Interface and Description |
|---|---|
interface |
MutableMapping<D,R>
Mutable version of a
Mapping, which supports setting keys for given values. |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayMapping<K extends NumericID,V> |
class |
MapMapping<D,R>
|
| Modifier and Type | Method and Description |
|---|---|
static <D,I,R> Mapping<D,R> |
Mappings.compose(Mapping<D,? extends I> first,
Mapping<? super I,R> second)
Retrieves the composition of two mappings, i.e., that mapping that results from applying the
get(Object) method consecutively. |
static <D,R> Mapping<D,R> |
Mappings.fromMap(Map<D,R> map) |
static <T> Mapping<T,T> |
Mappings.identity()
Retrieves the identity mapping, which maps each domain value to itself.
|
static <D,R> Mapping<D,R> |
Mappings.nullMapping()
Retrieves the
null mapping, which maps each domain value to null. |
static <D> Mapping<D,String> |
Mappings.toStringMapping()
Returns a mapping that maps objects to their
String representation, as obtained by String.valueOf(Object). |
static <S,T extends S> |
Mappings.upcast()
Returns a mapping that maps objects to a supertype representation.
|
| Modifier and Type | Method and Description |
|---|---|
static <D,R> Collection<R> |
Mappings.apply(Mapping<? super D,R> mapping,
Collection<? extends D> coll)
Applies a mapping to a collection, resulting in a collection containing the result of applying the specified
mapping to each element in the collection.
|
static <D,R> Iterable<R> |
Mappings.apply(Mapping<? super D,R> mapping,
Iterable<? extends D> it)
Applies a mapping to an iterable.
|
static <D,R> Iterator<R> |
Mappings.apply(Mapping<? super D,R> mapping,
Iterator<? extends D> baseIt)
Applies a mapping to an iterator.
|
static <D,R> List<R> |
Mappings.apply(Mapping<? super D,R> mapping,
List<? extends D> list)
Applies a mapping to a list, resulting in a list containing the result of applying the specified mapping to each
element in the list.
|
static <D,I,R> Mapping<D,R> |
Mappings.compose(Mapping<D,? extends I> first,
Mapping<? super I,R> second)
Retrieves the composition of two mappings, i.e., that mapping that results from applying the
get(Object) method consecutively. |
static <D,I,R> Mapping<D,R> |
Mappings.compose(Mapping<D,? extends I> first,
Mapping<? super I,R> second)
Retrieves the composition of two mappings, i.e., that mapping that results from applying the
get(Object) method consecutively. |
static <D> D |
Mappings.idGet(Mapping<D,D> mapping,
D key) |
static <D,R> R |
Mappings.nullGet(Mapping<? super D,? extends R> mapping,
D key) |
static <D,R> R |
Mappings.safeGet(Mapping<? super D,R> mapping,
D key,
R fallback)
Safely retrieves a value from a mapping.
|
Copyright © 2019. All rights reserved.