SerializableAllFilterSpec, AnyFilterSpec, BooleanFilterSpec, EqualsFilterSpec, GreaterEqualFilterSpec, HasFilterSpec, LessEqualFilterSpec, NotFilterSpec, SubstringFilterSpecpublic abstract class FilterSpec extends Object implements Serializable
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
FilterSpec.Visitor<P,R,E extends Exception> |
A visitor for filter spec traversal.
|
| Modifier and Type | Method | Description |
|---|---|---|
<R,E extends Exception> |
accept(FilterSpec.Visitor<?,R,E> visitor) |
|
abstract <P,R,E extends Exception> |
accept(FilterSpec.Visitor<P,R,E> visitor,
P parameter) |
|
static FilterSpec |
all() |
Create a filter which matches everything.
|
static FilterSpec |
all(Collection<FilterSpec> specs) |
Create a filter which matches all of the given sub-filters.
|
static FilterSpec |
all(FilterSpec... specs) |
Create a filter which matches all of the given sub-filters.
|
static FilterSpec |
any(Collection<FilterSpec> specs) |
Create a filter which matches any of the given sub-filters.
|
static FilterSpec |
any(FilterSpec... specs) |
Create a filter which matches any of the given sub-filters.
|
static FilterSpec |
approx(String attribute,
String value) |
Create a filter specification which approximately matches one attribute value.
|
static FilterSpec |
equal(String attribute,
byte[] value) |
Create a filter specification which matches one attribute value.
|
static FilterSpec |
equal(String attribute,
String value) |
Create a filter specification which matches one attribute value.
|
boolean |
equals(Object obj) |
|
abstract boolean |
equals(FilterSpec other) |
|
static String |
escape(String str) |
Escape an attribute string, suitable for putting into a filter.
|
static void |
escapeTo(String str,
StringBuilder b) |
Escape an attribute string, suitable for putting into a filter.
|
static FilterSpec |
fromString(String string) |
Create a new filter from a string.
|
static FilterSpec |
greaterOrEqual(String attribute,
byte[] value) |
Create a filter specification which matches when the given attribute's value is lexicographically greater than or
equal to the given value.
|
static FilterSpec |
greaterOrEqual(String attribute,
String value) |
Create a filter specification which matches when the given attribute's value is lexicographically greater than or
equal to the given value.
|
static FilterSpec |
hasAttribute(String attribute) |
Create a filter specification which matches when the given attribute is present.
|
static FilterSpec |
lessOrEqual(String attribute,
byte[] value) |
Create a filter specification which matches when the given attribute's value is lexicographically less than or
equal to the given value.
|
static FilterSpec |
lessOrEqual(String attribute,
String value) |
Create a filter specification which matches when the given attribute's value is lexicographically less than or
equal to the given value.
|
abstract boolean |
matchesMulti(Map<String,? extends Collection<AttributeValue>> attributes) |
Determine whether the given attribute multi-map matches this filter.
|
abstract boolean |
matchesSimple(Map<String,AttributeValue> attributes) |
Determine whether the given simple attribute map matches this filter.
|
abstract boolean |
mayMatch(Collection<String> attributeNames) |
Determine whether this filter spec might match an attribute map containing the given keys.
|
abstract boolean |
mayNotMatch(Collection<String> attributeNames) |
Determine whether this filter spec might not match an attribute map containing the given keys.
|
static FilterSpec |
none() |
Create a filter which matches nothing.
|
static FilterSpec |
not(FilterSpec spec) |
Create a filter which matches the inverse of the given filter.
|
static FilterSpec |
substringMatch(String attribute,
String initialPart,
String finalPart) |
Create a filter specification which matches a leading or trailing (or both) substring of one attribute value.
|
String |
toString() |
Get the string representation of this filter.
|
boolean |
willMatch(Collection<String> attributeNames) |
Determine whether this filter spec will always match an attribute map containing the given keys.
|
boolean |
willNotMatch(Collection<String> attributeNames) |
Determine whether this filter spec will never match an attribute map containing the given keys.
|
public abstract boolean matchesSimple(Map<String,AttributeValue> attributes)
attributes - the attribute maptrue if the map matches, false otherwisepublic abstract boolean matchesMulti(Map<String,? extends Collection<AttributeValue>> attributes)
attributes - the attribute maptrue if the map matches, false otherwisepublic final boolean willMatch(Collection<String> attributeNames)
mayNotMatch(Collection).attributeNames - the attribute namestrue if the filter will definitely match, false if it might not matchpublic abstract boolean mayMatch(Collection<String> attributeNames)
attributeNames - the attribute namestrue if the filter spec might match, false if it will definitely not matchpublic abstract boolean mayNotMatch(Collection<String> attributeNames)
attributeNames - the attribute namestrue if the filter spec might not match, false if it will definitely matchpublic final boolean willNotMatch(Collection<String> attributeNames)
mayMatch(Collection).attributeNames - the attribute namestrue if the filter will definitely not match, false if it might matchpublic abstract <P,R,E extends Exception> R accept(FilterSpec.Visitor<P,R,E> visitor, P parameter) throws E extends Exception
E extends Exceptionpublic final <R,E extends Exception> R accept(FilterSpec.Visitor<?,R,E> visitor) throws E extends Exception
E extends Exceptionpublic static FilterSpec fromString(String string)
string - the filter stringpublic static FilterSpec all()
public static FilterSpec none()
public static FilterSpec all(FilterSpec... specs)
specs - the sub-filterspublic static FilterSpec all(Collection<FilterSpec> specs)
specs - the sub-filterspublic static FilterSpec any(FilterSpec... specs)
specs - the sub-filterspublic static FilterSpec any(Collection<FilterSpec> specs)
specs - the sub-filterspublic static FilterSpec not(FilterSpec spec)
spec - the sub-filterpublic static FilterSpec equal(String attribute, String value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec equal(String attribute, byte[] value)
attribute - the attribute namevalue - the attribute byte valuepublic static FilterSpec substringMatch(String attribute, String initialPart, String finalPart)
attribute - the attribute nameinitialPart - the initial part, or "" to match any initial partfinalPart - the final part, or "" to match any final partpublic static FilterSpec approx(String attribute, String value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec greaterOrEqual(String attribute, String value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec greaterOrEqual(String attribute, byte[] value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec lessOrEqual(String attribute, String value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec lessOrEqual(String attribute, byte[] value)
attribute - the attribute namevalue - the attribute valuepublic static FilterSpec hasAttribute(String attribute)
attribute - the attribute namepublic static String escape(String str)
str - the string to escapepublic static void escapeTo(String str, StringBuilder b)
str - the string to escapeb - the builder to append topublic abstract boolean equals(FilterSpec other)
Copyright © 2019 JBoss by Red Hat. All rights reserved.