Class Like<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- org.apache.iotdb.tsfile.read.filter.operator.Like<T>
-
- Type Parameters:
T- comparable data type
- All Implemented Interfaces:
java.io.Serializable,Filter
- Direct Known Subclasses:
ValueFilter.ValueLike
public class Like<T extends java.lang.Comparable<T>> extends java.lang.Object implements Filter, java.io.Serializable
Like.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected FilterTypefilterTypeprotected booleannotprotected java.util.regex.Patternpatternprotected java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description Like()Like(java.lang.String value, FilterType filterType, boolean not)The main idea of this part comes from https://codereview.stackexchange.com/questions/36861/convert-sql-like-to-regex/36864
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(Statistics statistics)To examine whether all data points are satisfied with the filter.booleancontainStartEndTime(long startTime, long endTime)To examine whether the partition [startTime, endTime] is subsets of filter.Filtercopy()voiddeserialize(java.nio.ByteBuffer buffer)booleanequals(java.lang.Object o)FilterSerializeIdgetSerializeId()inthashCode()Filterreverse()booleansatisfy(long time, java.lang.Object value)To examine whether the single point(with time and value) is satisfied with the filter.booleansatisfy(Statistics statistics)To examine whether there are data points satisfied with the filter.booleansatisfyStartEndTime(long startTime, long endTime)To examine whether the min time and max time are satisfied with the filter.voidserialize(java.io.DataOutputStream outputStream)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iotdb.tsfile.read.filter.basic.Filter
getTimeRanges, serialize
-
-
-
-
Field Detail
-
value
protected java.lang.String value
-
filterType
protected FilterType filterType
-
pattern
protected java.util.regex.Pattern pattern
-
not
protected boolean not
-
-
Constructor Detail
-
Like
public Like()
-
Like
public Like(java.lang.String value, FilterType filterType, boolean not)The main idea of this part comes from https://codereview.stackexchange.com/questions/36861/convert-sql-like-to-regex/36864- Throws:
java.util.regex.PatternSyntaxException- if the regex expression's syntax is invalid
-
-
Method Detail
-
satisfy
public boolean satisfy(Statistics statistics)
Description copied from interface:FilterTo examine whether there are data points satisfied with the filter.
-
allSatisfy
public boolean allSatisfy(Statistics statistics)
Description copied from interface:FilterTo examine whether all data points are satisfied with the filter.- Specified by:
allSatisfyin interfaceFilter- Parameters:
statistics- statistics with min time, max time, min value, max value.
-
satisfy
public boolean satisfy(long time, java.lang.Object value)Description copied from interface:FilterTo examine whether the single point(with time and value) is satisfied with the filter.
-
satisfyStartEndTime
public boolean satisfyStartEndTime(long startTime, long endTime)Description copied from interface:FilterTo examine whether the min time and max time are satisfied with the filter.- Specified by:
satisfyStartEndTimein interfaceFilter- Parameters:
startTime- start time of a page, series or deviceendTime- end time of a page, series or device
-
containStartEndTime
public boolean containStartEndTime(long startTime, long endTime)Description copied from interface:FilterTo examine whether the partition [startTime, endTime] is subsets of filter.- Specified by:
containStartEndTimein interfaceFilter- Parameters:
startTime- start time of a partitionendTime- end time of a partition
-
serialize
public void serialize(java.io.DataOutputStream outputStream)
-
deserialize
public void deserialize(java.nio.ByteBuffer buffer)
- Specified by:
deserializein interfaceFilter
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSerializeId
public FilterSerializeId getSerializeId()
- Specified by:
getSerializeIdin interfaceFilter
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-