K
- the key type for the recordpublic interface ReadRecordAccessor<K extends java.lang.Comparable<K>>
Modifier and Type | Method and Description |
---|---|
K |
getKey()
Returns the key that this accessor is against.
|
ConditionalReadRecordAccessor<K> |
iff(java.util.function.Predicate<? super Record<K>> predicate)
Read operations on the returned ConditionalReadRecordAccessor will have the
supplied predicate applied to the record held against the key used to create this ReadRecordAccessor.
|
<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 ReadRecordAccessor.
|
K getKey()
ConditionalReadRecordAccessor<K> iff(java.util.function.Predicate<? super Record<K>> predicate)
predicate
- the predicate to apply to the record held against the key used to create
this ReadRecordAccessor.<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.