public abstract class Selectors
extends java.lang.Object
Selectors.| Modifier and Type | Class and Description |
|---|---|
static class |
Selectors.AnonymousKey |
| Constructor and Description |
|---|
Selectors() |
| Modifier and Type | Method and Description |
|---|---|
static Selector |
$()
A short-hand alias for
anonymous(). |
static Selector |
$(java.lang.String fmt,
java.lang.Object... args)
Creates a
Selector based on the given string format and arguments. |
static <T> Selector |
$(T obj)
A short-hand alias for
object(T). |
static Selector |
anonymous()
Creates an anonymous
Selector. |
static Selector |
matchAll()
Creates a
Selector that matches
all objects. |
static <T> Selector |
object(T obj)
Creates a
Selector based on the given object. |
static Selector |
predicate(reactor.fn.Predicate<java.lang.Object> predicate)
Creates a
Selector based on the given Predicate. |
static Selector |
R(java.lang.String regex)
A short-hand alias for
regex(String). |
static Selector |
regex(java.lang.String regex)
Creates a
Selector based on the given regular expression. |
static Selector |
setMembership(java.util.Set set)
Creates a
Selector that matches
objects on set membership. |
static ClassSelector |
T(java.lang.Class<?> supertype)
A short-hand alias for
type(Class). |
static ClassSelector |
type(java.lang.Class<?> supertype)
Creates a
Selector based on the given class type that matches objects whose type is
assignable according to Class.isAssignableFrom(Class). |
static Selector |
U(java.lang.String uri)
A short-hand alias for
uri(String). |
static Selector |
uri(java.lang.String uri)
Creates a
Selector based on a URI template. |
public static Selector anonymous()
Selector.ObjectSelectorpublic static Selector $()
anonymous().
Creates an anonymous Selector.ObjectSelectorpublic static <T> Selector object(T obj)
Selector based on the given object.obj - The object to use for matchingObjectSelector.ObjectSelectorpublic static <T> Selector $(T obj)
obj - The object to use for matchingObjectSelector.ObjectSelectorpublic static Selector $(java.lang.String fmt, java.lang.Object... args)
Selector based on the given string format and arguments.fmt - The String.format style format specificationargs - The format argsObjectSelector.ObjectSelector,
String.format(String, Object...)public static Selector regex(java.lang.String regex)
Selector based on the given regular expression.regex - The regular expression to compile and use for matchingRegexSelector.RegexSelectorpublic static Selector R(java.lang.String regex)
regex(String).
Creates a Selector based on the given regular expression.regex - The regular expression to compile and use for matchingRegexSelector.RegexSelectorpublic static ClassSelector type(java.lang.Class<?> supertype)
Selector based on the given class type that matches objects whose type is
assignable according to Class.isAssignableFrom(Class).supertype - The supertype to use for matchingClassSelector.ClassSelectorpublic static ClassSelector T(java.lang.Class<?> supertype)
type(Class).
Creates a Selector based on the given class type that matches objects whose type is
assignable according to Class.isAssignableFrom(Class).supertype - The supertype to compare.ClassSelector.ClassSelectorpublic static Selector uri(java.lang.String uri)
Selector based on a URI template.uri - The string to compile into a URI template and use for matchingUriPathSelector.UriPathTemplate,
UriPathSelectorpublic static Selector U(java.lang.String uri)
uri(String).
Creates a Selector based on a URI template.uri - The string to compile into a URI template and use for matchingUriPathSelector.UriPathTemplate,
UriPathSelectorpublic static Selector predicate(reactor.fn.Predicate<java.lang.Object> predicate)
Selector based on the given Predicate.predicate - The Predicate to delegate to when matching objects.PredicateSelectorpublic static Selector matchAll()
Selector that matches
all objects.MatchAllSelectorMatchAllSelectorpublic static Selector setMembership(java.util.Set set)
Selector that matches
objects on set membership.SetMembershipSelectorSetMembershipSelector