K
- the key type for the recordpublic interface ConditionalReadRecordAccessor<K extends java.lang.Comparable<K>>
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Record<K>> |
read()
Reads the record held against the key used to create this ConditionalReadRecordAccessor,
if that record matches the predicate used to create this ConditionalReadRecordAccessor.
|
default <T> java.util.Optional<T> |
read(java.util.function.Function<? super Record<K>,T> mapper)
Maps the record held against the key used to create this ConditionalReadRecordAccessor,
if that record matches the predicate used to create this ConditionalReadRecordAccessor.
|
default <T> java.util.Optional<T> read(java.util.function.Function<? super Record<K>,T> mapper)
T
- the type returned by the function defined in the mapper parameter.mapper
- the function to apply to the record.java.util.Optional<Record<K>> read()