public abstract class Selectors extends 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 |
$(String fmt,
Object... args)
Creates a
Selector based on the given string format and arguments. |
static <T> Selector<T> |
$(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<T> |
object(T obj)
Creates a
Selector based on the given object. |
static Selector |
predicate(Predicate<Object> predicate)
|
static Selector |
R(String regex)
A short-hand alias for
regex(String). |
static Selector |
regex(String regex)
Creates a
Selector based on the given regular expression. |
static Selector |
setMembership(Set set)
Creates a
Selector that matches
objects on set membership. |
static ClassSelector |
T(Class<?> supertype)
A short-hand alias for
type(Class). |
static ClassSelector |
type(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(String uri)
A short-hand alias for
uri(String). |
static Selector |
uri(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<T> object(T obj)
Selector based on the given object.obj - The object to use for matchingObjectSelector.ObjectSelectorpublic static <T> Selector<T> $(T obj)
obj - The object to use for matchingObjectSelector.ObjectSelectorpublic static Selector $(String fmt, 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(String regex)
Selector based on the given regular expression.regex - The regular expression to compile and use for matchingRegexSelector.RegexSelectorpublic static Selector R(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(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(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(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(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(Predicate<Object> predicate)
predicate - The Predicate to delegate to when matching objects.PredicateSelectorpublic static Selector matchAll()
Selector that matches
all objects.MatchAllSelectorMatchAllSelectorpublic static Selector setMembership(Set set)
Selector that matches
objects on set membership.SetMembershipSelectorSetMembershipSelectorCopyright © 2016. All rights reserved.