Uses of Interface
org.microbean.bean.Reducer
-
Uses of Reducer in org.microbean.bean
Classes in org.microbean.bean that implement ReducerMethods in org.microbean.bean that return ReducerModifier and TypeMethodDescriptionRankedReducer.of()
Returns aRankedReducer
implementation.static <C,
T> Reducer <C, T> Reducer.ofFailing()
Returns aReducer
whosereduce(List, Object, BiFunction)
method, for a givenList
of elements, returns the result of invoking its supplied failure handler.static <C,
T> Reducer <C, T> Reducer.ofSimple()
Returns aReducer
whosereduce(List, Object, BiFunction)
method, for a givenList
of elements, returns theList
's sole element if theList
has exactly one element, and returns the result of invoking its supplied failure handler otherwise.Methods in org.microbean.bean with parameters of type ReducerModifier and TypeMethodDescriptionstatic <C,
E> Reducible <C, E> Reducible.of
(Selectable<C, E> selectable, Reducer<C, E> r) Calls theReducible.of(Selectable, Reducer, BiFunction)
method with the suppliedselectable
, the suppliedr
, and a reference to thefail(List, Object)
method, and returns the result.static <C,
E> Reducible <C, E> Reducible.of
(Selectable<C, E> selectable, Reducer<C, E> r, BiFunction<? super List<? extends E>, ? super C, ? extends E> failureHandler) static <C,
E> Reducible <C, E> Reducible.ofCaching
(Selectable<C, E> selectable, Reducer<C, E> r) Calls theReducible.ofCaching(Selectable, Reducer, BiFunction)
method with the suppliedselectable
, the suppliedr
, the suppliedfailureHandler
, and a reference to thefail(List, Object)
method, and returns its result.static <C,
E> Reducible <C, E> Reducible.ofCaching
(Selectable<C, E> selectable, Reducer<C, E> r, BiFunction<? super List<? extends E>, ? super C, ? extends E> fh) Calls theReducible.ofCaching(Selectable, Reducer, BiFunction, BiFunction)
method with the suppliedselectable
, the suppliedr
, the suppliedfh
, and a reference to thecomputeIfAbsent(Object, Function)
method of a newConcurrentHashMap
, and returns its result.static <C,
E> Reducible <C, E> Reducible.ofCaching
(Selectable<C, E> selectable, Reducer<C, E> r, BiFunction<? super List<? extends E>, ? super C, ? extends E> fh, BiFunction<? super C, Function<C, E>, ? extends E> cache) Returns aReducible
implementation that uses the suppliedReducer
for its reduction operations and the suppliedcomputeIfAbsent
BiFunction
for its caching implementation.Constructors in org.microbean.bean with parameters of type ReducerModifierConstructorDescriptionBeans
(Selectable<AttributedType, Bean<?>> s, Reducer<AttributedType, Bean<?>> r) Creates a newBeans
.