public class KeyTypeInfo.Builder.KeyFunctionBuilder<T,U>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
KeyTypeInfo.Builder |
bundle()
Bundle the getter & exists functions into a KeyFunction
|
KeyTypeInfo.Builder.KeyFunctionBuilder<T,U> |
exists(java.util.function.Predicate<U> exists)
Set the function to check if something exists in a data structure via the mapped key
|
KeyTypeInfo.Builder.KeyFunctionBuilder<T,U> |
getter(java.util.function.Function<U,java.lang.Object> getter)
Set the function to get from a data structure via the mapped key
|
<O> KeyTypeInfo.Builder |
list(java.util.List<O> list,
java.util.function.BiPredicate<U,O> filter,
O def)
Util to build a KeyFunction based on the list data structure
|
<O> KeyTypeInfo.Builder |
map(java.util.Map<U,O> map,
O def)
Util to build a KeyFunction based on the map data structure
|
public final KeyTypeInfo.Builder.KeyFunctionBuilder<T,U> getter(java.util.function.Function<U,java.lang.Object> getter)
getter
- Function to get from data structurepublic final KeyTypeInfo.Builder.KeyFunctionBuilder<T,U> exists(java.util.function.Predicate<U> exists)
exists
- Function to check if <U> exists (or what it represents) in a data structurepublic final <O> KeyTypeInfo.Builder map(java.util.Map<U,O> map, O def)
O
- Unknown value type of mapmap
- Map instancedef
- Default valuepublic final <O> KeyTypeInfo.Builder list(java.util.List<O> list, java.util.function.BiPredicate<U,O> filter, O def)
O
- Unknown value type of listlist
- List instancefilter
- Filter to find the relevant value based on Udef
- Default valuepublic final KeyTypeInfo.Builder bundle()