-
- Type Parameters:
S- storage typeK- key typeV- value type
- 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 KeyGetter<S,K,V>
Gets a possible value from storage at a specified key.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<V>get(S storage, K key)Gets a possible value from storage at the specified key.static <S,K,V>
KeyGetter<S,K,V>maybe(BiFunction<S,K,@NullOr V> getter)Converts a direct key getter into an optional key getter.
-
-
-
Method Detail
-
maybe
static <S,K,V> KeyGetter<S,K,V> maybe(BiFunction<S,K,@NullOr V> getter)
Converts a direct key getter into an optional key getter.- Type Parameters:
S- storage typeK- key typeV- value type- Parameters:
getter- direct key getter- Returns:
- the direct getter wrapped by an optional
-
-