Class Selectables
java.lang.Object
org.microbean.bean.Selectables
-
Method Summary
Modifier and TypeMethodDescriptionstatic final <C,
E extends Ranked>
Selectable<C, E> ambiguityReducing
(Selectable<C, E> s) Deprecated, for removal: This API element is subject to removal in a future version.static final <C,
E> Selectable <C, E> ambiguityReducing
(Selectable<C, E> s, Predicate<? super E> p, ToIntFunction<? super E> ranker) Returns aSelectable
that reduces any ambiguity in the results returned by anotherSelectable
, considering alternate status and rank.static final Selectable
<AttributedType, Bean<?>> typesafeReducing
(Collection<? extends Bean<?>> beans, Matcher<? super AttributedType, ? super Id> m) Normalizes the suppliedCollection
ofBean
s and returns aSelectable
for it and the suppliedMatcher
.
-
Method Details
-
ambiguityReducing
@Deprecated(forRemoval=true, since="0.0.19") public static final <C,E extends Ranked> Selectable<C,E> ambiguityReducing(Selectable<C, E> s) Deprecated, for removal: This API element is subject to removal in a future version.Please use theambiguityReducing(Selectable, Predicate, ToIntFunction)
method instead.Returns aSelectable
that reduces any ambiguity in the results returned by anotherSelectable
, considering alternate status and rank.- Type Parameters:
C
- the criteria typeE
- the element type- Parameters:
s
- aSelectable
; must not benull
- Returns:
- a non-
null
Selectable
- Throws:
NullPointerException
- ifs
isnull
- See Also:
-
ambiguityReducing
public static final <C,E> Selectable<C,E> ambiguityReducing(Selectable<C, E> s, Predicate<? super E> p, ToIntFunction<? super E> ranker) Returns aSelectable
that reduces any ambiguity in the results returned by anotherSelectable
, considering alternate status and rank.- Type Parameters:
C
- the criteria typeE
- the element type- Parameters:
s
- aSelectable
; must not benull
p
- aPredicate
that tests whether an element is an alternate; must not benull
ranker
- aToIntFunction
that returns a rank for an alternate; a rank of0
indicates no particular rank; must not benull
- Returns:
- a non-
null
Selectable
- Throws:
NullPointerException
- if any argument isnull
-
typesafeReducing
public static final Selectable<AttributedType,Bean<?>> typesafeReducing(Collection<? extends Bean<?>> beans, Matcher<? super AttributedType, ? super Id> m) Normalizes the suppliedCollection
ofBean
s and returns aSelectable
for it and the suppliedMatcher
.The
Selectable
does not cache its results.- Parameters:
beans
- aCollection
ofBean
s; must not benull
m
- anIdMatcher
; must not benull
- Returns:
- a non-
null
Selectable
- Throws:
NullPointerException
- if any argument isnull
- See Also:
-
ambiguityReducing(Selectable, Predicate, ToIntFunction)
method instead.