Modifier and Type | Method and Description |
---|---|
static Filter |
and(Collection<Filter> subFilters)
Creates a new "AND" filter using the provided list of sub-filters.
|
static Filter |
and(Filter... subFilters)
Creates a new "AND" filter using the provided list of sub-filters.
|
static Filter |
and(Filter leftHandSide,
Filter rightHandSide)
Logically "ANDs" together the two specified instances of
Filter . |
static Filter |
contains(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that contains as any substring
the value of the specified Attribute . |
static Filter |
containsAllValues(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that contains all the values from the
specified Attribute . |
static Filter |
endsWith(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that
contains as a final substring the value of the specified
Attribute . |
static Filter |
equalsIgnoreCase(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is equal to, not considering the case
the value of the specified Attribute . |
static Filter |
equalTo(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is lexically equal to the
value of the specified Attribute . |
static Filter |
greaterThan(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is lexically greater than
the value of the specified Attribute . |
static Filter |
greaterThanOrEqualTo(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is
lexically greater than or equal to the value of the specified
Attribute . |
static Filter |
lessThan(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is lexically less than the
value of the specified Attribute . |
static Filter |
lessThanOrEqualTo(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that is
lexically less than or equal to the value of the specified
Attribute . |
static Filter |
not(Filter filter)
Logically negate the specified
Filter . |
static Filter |
or(Collection<Filter> subFilters)
Creates a new "OR" filter using the provided list of sub-filters.
|
static Filter |
or(Filter... subFilters)
Creates a new "OR" filter using the provided list of sub-filters.
|
static Filter |
or(Filter leftHandSide,
Filter rightHandSide)
Logically "OR" together the two specified instances of
Filter . |
static Filter |
startsWith(Attribute attr)
Select only an input
ConnectorObject with a value for the
specified Attribute that contains as an
initial substring the value of the specified
Attribute . |
public static Filter endsWith(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that
contains as a final substring the value of the specified
Attribute
.
For example, if the specified Attribute
were
{"hairColor": "d"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "red"}
or
{"hairColor": "blond"}
but would not match any ConnectorObject
that
contains only values such as
{"hairColor": "blonde"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
contains as its last part the value of the specified
Attribute
; otherwise false
.public static Filter startsWith(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that contains as an
initial substring the value of the specified
Attribute
.
For example, if the specified Attribute
were
{"hairColor": "b"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brown"}
or
{"hairColor": "blond"}
but would not match any ConnectorObject
that
contains only values such as
{"hairColor": "red"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
contains as its first part the value of the specified
Attribute
; otherwise false
.public static Filter contains(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that contains as any substring
the value of the specified Attribute
.
For example, if the specified Attribute
were
{"hairColor": "a"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "auburn"}
or
{"hairColor": "gray"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "red"}
or
{"hairColor": "grey"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
contains anywhere within it the value of the specified
Attribute
; otherwise false
.public static Filter equalsIgnoreCase(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is equal to, not considering the case
the value of the specified Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brown"}
or
{"hairColor": "bRoWn"}
but would not match any ConnectorObject
that
contains only values such as
{"hairColor": "red"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
is equal ignore case the value of the specified
Attribute
; otherwise false
.public static Filter equalTo(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is lexically equal to the
value of the specified Attribute
.
For example, if the specified
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric. The values
Two attributes with binary syntax are equal if and only if their
constituent bytes match.Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brown"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "brownish-gray"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
"01"
and "1"
are unequal
lexically, although they would be equivalent arithmetically.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
matches lexically the value of the specified
Attribute
; otherwise false
.public static Filter greaterThanOrEqualTo(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is
lexically greater than or equal to the value of the specified
Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brown"}
or
{"hairColor": "brownish-gray"}
or
{"hairColor": "red"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "black"}
or
{"hairColor": "blond"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric.
When compared lexically, "99"
is greater than
"123"
.
When compared arithmetically, 99
is less than
123
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
matches or sorts alphabetically after the value of the
specified Attribute
; otherwise false
.public static Filter lessThanOrEqualTo(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is
lexically less than or equal to the value of the specified
Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brown"}
or
{"hairColor": "black"}
or
{"hairColor": "blond"}
or
{"hairColor": "auburn"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "brownish-gray"}
or
{"hairColor": "red"}
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric.
When compared lexically, "99"
is greater than
"123"
.
When compared arithmetically, 99
is less than
123
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
matches or sorts alphabetically before the value of the
specified Attribute
; otherwise false
.public static Filter lessThan(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is lexically less than the
value of the specified Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "black"}
or
{"hairColor": "blond"}
or
{"hairColor": "auburn"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "brown"}
or
{"hairColor": "brownish-gray"}
or
{"hairColor": "red"}
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric.
When compared lexically, "99"
is greater than
"123"
.
When compared arithmetically, 99
is less than
123
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
sorts alphabetically before the value of the specified
Attribute
; otherwise false
.public static Filter greaterThan(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that is lexically greater than
the value of the specified Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown"}
,
this would match any ConnectorObject
with a value such as
{"hairColor": "brownish-gray"}
or
{"hairColor": "red"}
but would not match any ConnectorObject
that
contains only
{"hairColor": "brown"}
or
{"hairColor": "black"}
or
{"hairColor": "blond"}
or
{"hairColor": "auburn"}
.
This also would not match any ConnectorObject
that
contains only {"hairColor": null}
or that lacks the attribute "hairColor"
.
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric.
When compared lexically, "99"
is greater than
"123"
.
When compared arithmetically, 99
is less than
123
.
attr
- Attribute
containing exactly one value
to test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method will return true
if at least one value of the
corresponding attribute of the ConnectorObject
sorts alphabetically after the value of the specified
Attribute
; otherwise false
.public static Filter and(Filter leftHandSide, Filter rightHandSide)
Filter
.
The resulting conjunct Filter
is true if and only if
both of the specified filters are true.leftHandSide
- left-hand-side filter.rightHandSide
- right-hand-side filter.(leftHandSide && rightHandSide)
public static Filter and(Collection<Filter> subFilters)
Creating a new "AND" filter with a null
or empty list of
sub-filters is equivalent to calling "alwaysTrue".
subFilters
- The list of sub-filters, may be empty or null
.public static Filter and(Filter... subFilters)
Creating a new "AND" filter with a null
or empty list of
sub-filters is equivalent to calling "alwaysTrue".
subFilters
- The list of sub-filters, may be empty or null
.public static Filter or(Filter leftHandSide, Filter rightHandSide)
Filter
.
The resulting disjunct Filter
is true if and only if
at least one of the specified filters is true.leftHandSide
- left-hand-side filter.rightHandSide
- right-hand-side filter.(leftHandSide || rightHandSide)
public static Filter or(Collection<Filter> subFilters)
Creating a new "OR" filter with a null
or empty list of
sub-filters is equivalent to "alwaysTrue".
subFilters
- The list of sub-filters, may be empty or null
.or
filter.public static Filter or(Filter... subFilters)
Creating a new "OR" filter with a null
or empty list of
sub-filters is equivalent to "alwaysTrue".
subFilters
- The list of sub-filters, may be empty or null
.or
filter.public static Filter not(Filter filter)
Filter
. The resulting
Filter
is true if and only if the specified filter is false.filter
- the Filter
to negate.(!filter)
.public static Filter containsAllValues(Attribute attr)
ConnectorObject
with a value for the
specified Attribute
that contains all the values from the
specified Attribute
.
For example, if the specified Attribute
were
{"hairColor": "brown", "red"}
,
this would match any ConnectorObject
with values such as
{"hairColor": "black", "brown", "red"}
{"hairColor": "blond", "brown", "red"}
{"hairColor": "auburn", "brown", "red"}
ConnectorObject
that contains
only
{"hairColor": "brown"}
{"hairColor": "brownish-gray"}
{"hairColor": "red"}
ConnectorObject
that
contains only {"hairColor": null}
"hairColor"
.
NOTE: Lexical comparison of two string values compares the
characters of each value, even if the string values could be interpreted
as numeric.
attr
- Attribute
containing exactly one value to
test against each value of the corresponding
ConnectorObject
attribute.Filter
whose accept()
method
will return true
if at least one value of the
corresponding attribute of the ConnectorObject
sorts alphabetically before the value of the specified
Attribute
; otherwise false
.Copyright © 2019. All rights reserved.