Package io.deephaven.api.filter
Class FilterIn
java.lang.Object
io.deephaven.api.filter.FilterBase
io.deephaven.api.filter.FilterIn
- All Implemented Interfaces:
Expression
,Filter
Evaluates to true when
expression()
is equal to any value in values()
.
See asComparisons()
for the logical equivalent expressed more verbosely.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.api.filter.Filter
Filter.Visitor<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Filter
Creates the logical equivalent ofthis
as anFilter.or(Collection)
withFilterComparison.eq(Expression, Expression)
betweenexpression()
and eachvalues()
.final FilterComparison
asEquals()
Creates the logical equivalent ofthis
as a singleFilterComparison.eq(Expression, Expression)
betweenexpression()
and the only value fromvalues()
.static FilterIn.Builder
builder()
abstract Expression
invert()
The logical inversion ofthis
.static FilterIn
of
(Expression expression, Expression... values) static FilterIn
of
(Expression expression, List<Expression> values) abstract List<Expression>
values()
final <T> T
walk
(Filter.Visitor<T> visitor) Methods inherited from class io.deephaven.api.filter.FilterBase
walk
-
Constructor Details
-
FilterIn
public FilterIn()
-
-
Method Details
-
builder
-
of
-
of
-
expression
-
values
-
invert
Description copied from interface:Filter
The logical inversion ofthis
. While logically equivalent toFilter.not(this)
, implementations of this method will return more specifically typed inversions where applicable.- Returns:
- the inverse filter
- See Also:
-
walk
-
asComparisons
Creates the logical equivalent ofthis
as anFilter.or(Collection)
withFilterComparison.eq(Expression, Expression)
betweenexpression()
and eachvalues()
.Equivalent to
Filter.or(values().stream().map(rhs -> FilterComparison.eq(expression(), rhs)).collect(Collectors.toList()))
.- Returns:
- the filter as comparisons
- See Also:
-
asEquals
Creates the logical equivalent ofthis
as a singleFilterComparison.eq(Expression, Expression)
betweenexpression()
and the only value fromvalues()
.- Returns:
- the equals-filter
- Throws:
IllegalArgumentException
- ifvalues().size() != 1
-