java.lang.Object
org.microbean.bean.Beans
- All Implemented Interfaces:
Reducible<AttributedType,,Bean<?>> Selectable<AttributedType,Bean<?>>
public final class Beans
extends Object
implements Selectable<AttributedType,Bean<?>>, Reducible<AttributedType,Bean<?>>
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBeans(Selectable<AttributedType, Bean<?>> s, Reducible<AttributedType, Bean<?>> r) -
Method Summary
Modifier and TypeMethodDescriptionstatic final Selectable<AttributedType, Bean<?>> cachingSelectableOf(Matcher<? super AttributedType, ? super Id> idMatcher, Map<? extends AttributedType, ? extends List<Bean<?>>> selections, Collection<? extends Bean<?>> beans) final Bean<?> Given a criteria object, which may benull, returns an object that represents the reduction of a notional collection of objects.Selects and returns an immutableListrepresenting a sublist of thisSelectable's elements, as mediated by the supplied criteria.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.microbean.bean.Selectable
list
-
Constructor Details
-
Beans
-
-
Method Details
-
select
Description copied from interface:SelectableSelects and returns an immutableListrepresenting a sublist of thisSelectable's elements, as mediated by the supplied criteria.Implementations of this method must be idempotent and must return a determinate value.
Implementations of this method must not return
null.Implementations of this method should not call
Selectable.list(), since that method is typically implemented in terms of this one.- Specified by:
selectin interfaceSelectable<AttributedType,Bean<?>> - Parameters:
c- the criteria to use; may benull- Returns:
- an immutable sublist of this
Selectable's elements; nevernull - See Also:
-
reduce
Description copied from interface:ReducibleGiven a criteria object, which may benull, returns an object that represents the reduction of a notional collection of objects.Most
Reducibleimplementations will return determine values from invocations of this method, but there is no requirement to do so.- Specified by:
reducein interfaceReducible<AttributedType,Bean<?>> - Parameters:
c- the criteria; may benullto indicate no criteria- Returns:
- a single object, or
null
-
cachingSelectableOf
public static final Selectable<AttributedType,Bean<?>> cachingSelectableOf(Matcher<? super AttributedType, ? super Id> idMatcher, Map<? extends AttributedType, ? extends List<Bean<?>>> selections, Collection<? extends Bean<?>> beans)
-