Package io.deephaven.api.filter
Class FilterPattern
java.lang.Object
io.deephaven.api.filter.FilterBase
io.deephaven.api.filter.FilterPattern
- All Implemented Interfaces:
Expression
,Filter
A filter based on a regular-expression
Pattern
, compatible with any column types that are compatible with
CharSequence
.
In the MATCHES
case, the logic is equivalent to
value != null && (invertPattern() ^ pattern().matcher(value).matches())
.
In the FIND
case, the logic is equivalent to
value != null && (invertPattern() ^ pattern().matcher(value).find())
.
This filter will never match null
values.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static enum
The pattern modeNested classes/interfaces inherited from interface io.deephaven.api.filter.Filter
Filter.Visitor<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilterPattern.Builder
builder()
final boolean
abstract Expression
final int
hashCode()
final FilterNot<FilterPattern>
invert()
The logical inversion ofthis
.boolean
abstract FilterPattern.Mode
mode()
static FilterPattern
of
(Expression expression, Pattern pattern, FilterPattern.Mode mode, boolean invertPattern) abstract Pattern
pattern()
final String
toString()
final <T> T
walk
(Filter.Visitor<T> visitor) Methods inherited from class io.deephaven.api.filter.FilterBase
walk
-
Constructor Details
-
FilterPattern
public FilterPattern()
-
-
Method Details
-
builder
-
of
public static FilterPattern of(Expression expression, Pattern pattern, FilterPattern.Mode mode, boolean invertPattern) -
expression
-
pattern
-
mode
-
invertPattern
@Default public boolean invertPattern() -
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
-
toString
-
equals
-
hashCode
public final int hashCode()
-