S - source typeT - target typepublic interface KeyBimap<S,T>
S and T (source and
target). This is used to create adapters exposing a T→V cache as a
S→V cache.
The S→T mapping must be injective. If the S→T mapping is not
bijective, getSource(Object) should return null for target
keys with no corresponding source key.
| Modifier and Type | Method and Description |
|---|---|
static <S,T> KeyBimap<S,T> |
build(Function<S,T> soureToTarget,
Function<T,S> targetToSource) |
S |
getSource(T target)
Returns source key source key mapping to a given target key, or
null if there is no such source key. |
T |
getTarget(S source)
Returns target key for a given source key.
|
T getTarget(S source)
source - source keysourceS getSource(T target)
null if there is no such source key.target - target keytarget, or null if
there is no such source key.Copyright © 2015–2022 ImgLib2. All rights reserved.