Interface QueryFunction<C,T>
- All Superinterfaces:
Function<C,Set<T>>, NameHelper
sam function for store query
apply(C) -> Set<T>
QueryFunction<T> query = ctx -> ctx.get(key)
supports functional composition filter(Predicate), map(Function), flatMap(Function), ...
-
Field Summary
Fields inherited from interface NameHelper
primitiveDescriptors, primitiveNames, primitiveTypes -
Method Summary
Modifier and TypeMethodDescriptiondefault <R> QueryFunction<C, T> add(QueryFunction<C, T> function) concat elements from functiondefault <R> QueryFunction<C, Class<? extends R>> as()cast elements as<R>unsafedefault <R> QueryFunction<C, R> as(Class<? extends R> type, ClassLoader... loaders) convert to giventype, usesNameHelper.forName(java.lang.String, java.lang.Class, java.lang.ClassLoader...)default <R> QueryFunction<C, Class<?>> asClass(ClassLoader... loaders) convert elements toClassusingNameHelper.forName(java.lang.String, java.lang.Class, java.lang.ClassLoader...)default QueryFunction<C, String> asString()convert elements to String usingNameHelper.toName(AnnotatedElement)static <C,T> QueryFunction <Store, T> empty()default QueryFunction<C, T> filter by predicatedefault <R> QueryFunction<C, R> flatmap by functiondefault <R> QueryFunction<C, R> transitively get all bybuilderdefault QueryFunction<C, T> transitively get all bybuilderdefault <R> QueryFunction<C, R> map by functionstatic <C,T> QueryFunction <Store, T> set(Collection<T> elements) static <C,T> QueryFunction <Store, T> single(T element)
-
Method Details
-
apply
-
empty
-
single
-
set
-
filter
filter by predicateSubTypes.of(type).filter(withPrefix("org")) -
map
map by functionTypesAnnotated.with(annotation).asClass().map(Annotation::annotationType) -
flatMap
-
getAll
transitively get all bybuilderSuperTypes.of(type).getAll(Annotations::get) -
getAll
default <R> QueryFunction<C,R> getAll(Function<T, QueryFunction<C, R>> builder, Function<R, T> traverse) transitively get all bybuilderSuperTypes.of(type).getAll(Annotations::get) -
add
concat elements from functionAnnotations.of(method).add(Annotations.of(type)) -
as
convert to giventype, usesNameHelper.forName(java.lang.String, java.lang.Class, java.lang.ClassLoader...)Methods.of(type).as(Method.class) -
asClass
convert elements toClassusingNameHelper.forName(java.lang.String, java.lang.Class, java.lang.ClassLoader...)SubTypes.of(type).asClass() -
asString
convert elements to String usingNameHelper.toName(AnnotatedElement) -
as
cast elements as<R>unsafe
-