Interface Mapping<D,R>
-
- Type Parameters:
D
- domain type.R
- range type.
- All Superinterfaces:
Function<D,R>
- All Known Subinterfaces:
MutableMapping<D,R>
- All Known Implementing Classes:
ArrayMapping
,BlockMap
,MapMapping
,StateIDGrowingMapping
,StateIDStaticMapping
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Mapping<D,R> extends Function<D,R>
An interface for mapping objects of a certain domain type to objects of a certain range type.A mapping is very much like a
Map
, but the perspective is a different one: Whereas a map is a (particularly finite) key/value collection, a mapping is more like a function: it does not support retrieval of all keys or values, because it does not require them to be stored at all. Instead, they can be calculated on the fly upon an invocation ofget(Object)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default R
apply(D elem)
R
get(D elem)
Get the range objectelem
maps to.
-