D
- domain type.R
- range type.@FunctionalInterface public interface Mapping<D,R> extends Function<D,R>
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 requires them to be stored at all. Instead, they can be calculated on the fly upon an invocation
of get(Object)
.
Modifier and Type | Method and Description |
---|---|
default R |
apply(D elem)
Get the range object
elem maps to. |
R |
get(D elem) |
Copyright © 2018. All rights reserved.