Package org.apache.sis.filter
Class ComparisonFilter.GreaterThan<R>
java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.filter.BinaryFunction<R,Object,Object>
org.apache.sis.filter.ComparisonFilter<R>
org.apache.sis.filter.ComparisonFilter.GreaterThan<R>
- Type Parameters:
R
- the type of resources used as inputs.
- All Implemented Interfaces:
Serializable
,Predicate<R>
,Filter<R>
,Optimization.OnFilter<R>
,BinaryComparisonOperator<R>
- Enclosing class:
- ComparisonFilter<R>
The
"PropertyIsGreaterThan"
(>) filter.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.filter.ComparisonFilter
ComparisonFilter.Between<R>, ComparisonFilter.EqualTo<R>, ComparisonFilter.GreaterThan<R>, ComparisonFilter.GreaterThanOrEqualTo<R>, ComparisonFilter.LessThan<R>, ComparisonFilter.LessThanOrEqualTo<R>, ComparisonFilter.NotEqualTo<R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility during (de)serialization.Fields inherited from class org.apache.sis.filter.ComparisonFilter
isMatchingCase, matchAction
Fields inherited from class org.apache.sis.filter.BinaryFunction
expression1, expression2
-
Constructor Summary
ConstructorsConstructorDescriptionGreaterThan
(Expression<? super R, ?> expression1, Expression<? super R, ?> expression2, boolean isMatchingCase, MatchAction matchAction) Creates a new filter. -
Method Summary
Modifier and TypeMethodDescriptionprotected Number
applyAsDouble
(double left, double right) Performs the comparison and returns the result as 0 (false) or 1 (true).protected Number
applyAsLong
(long left, long right) Calculates this function using given operands oflong
primitive type.protected boolean
compare
(ChronoLocalDate left, ChronoLocalDate right) Compares two dates without time-of-day and time-zone information.protected boolean
compare
(ChronoLocalDateTime<?> left, ChronoLocalDateTime<?> right) Compares two dates without time-zone information.protected boolean
compare
(ChronoZonedDateTime<?> left, ChronoZonedDateTime<?> right) Compares two dates with time-zone information.protected boolean
compare
(OffsetDateTime left, OffsetDateTime right) Compares two dates with time-zone information.protected boolean
compare
(OffsetTime left, OffsetTime right) Compares two times with time-zone information.protected boolean
fromCompareTo
(int result) ConvertsComparable.compareTo(Object)
result to this filter result.Identification of the this operation.recreate
(Expression<? super R, ?>[] effective) Creates a new filter of the same type but different parameters.protected char
symbol()
Returns the mathematical symbol for this binary function.Methods inherited from class org.apache.sis.filter.ComparisonFilter
applyAsDecimal, applyAsFraction, applyAsInteger, equals, getMatchAction, getOperand1, getOperand2, hashCode, isMatchingCase, test, toInstant
Methods inherited from class org.apache.sis.filter.BinaryFunction
apply, getChildren, getExpressions, getParameters
Methods inherited from class org.apache.sis.internal.filter.Node
createName, createType, getGeometryLibrary, toGeometryWrapper, toString, unwrap, warning
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sis.filter.Filter
getExpressions
Methods inherited from interface org.apache.sis.filter.Optimization.OnFilter
and, negate, optimize, or
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility during (de)serialization.- See Also:
-
-
Constructor Details
-
GreaterThan
GreaterThan(Expression<? super R, ?> expression1, Expression<? super R, ?> expression2, boolean isMatchingCase, MatchAction matchAction) Creates a new filter.
-
-
Method Details
-
recreate
Creates a new filter of the same type but different parameters.- Parameters:
effective
- the expressions to use as a replacement of this filter expressions.- Returns:
- the new filter, or
this
if unsupported.
-
getOperatorType
Identification of the this operation.- Returns:
- the nature of this operator.
-
symbol
protected char symbol()Description copied from class:Node
Returns the mathematical symbol for this binary function. For comparison operators, the symbol should be one of < > ≤ ≥ = ≠. For arithmetic operators, the symbol should be one of + − × ÷. -
fromCompareTo
protected boolean fromCompareTo(int result) ConvertsComparable.compareTo(Object)
result to this filter result.- Specified by:
fromCompareTo
in classComparisonFilter<R>
-
applyAsDouble
Performs the comparison and returns the result as 0 (false) or 1 (true).- Overrides:
applyAsDouble
in classBinaryFunction<R,
Object, Object>
-
applyAsLong
Description copied from class:BinaryFunction
Calculates this function using given operands oflong
primitive type. If this function is a filter, then this method should returns anInteger
value 0 or 1 for false or true respectively. Otherwise the result is usually aLong
, except for division which may produce other types. This method may returnnull
if the operation cannot apply on numbers.- Overrides:
applyAsLong
in classBinaryFunction<R,
Object, Object>
-
compare
Description copied from class:ComparisonFilter
Compares two times with time-zone information. Implementations shall not usecompareTo(…)
because that method compares more information than desired in order to ensure consistency withequals(…)
.- Specified by:
compare
in classComparisonFilter<R>
-
compare
Description copied from class:ComparisonFilter
Compares two dates with time-zone information. Implementations shall not usecompareTo(…)
because that method compares more information than desired in order to ensure consistency withequals(…)
.- Specified by:
compare
in classComparisonFilter<R>
-
compare
Description copied from class:ComparisonFilter
Compares two dates without time-of-day and time-zone information. Implementations shall not usecompareTo(…)
because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.- Specified by:
compare
in classComparisonFilter<R>
-
compare
Description copied from class:ComparisonFilter
Compares two dates without time-zone information. Implementations shall not usecompareTo(…)
because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.- Specified by:
compare
in classComparisonFilter<R>
-
compare
Description copied from class:ComparisonFilter
Compares two dates with time-zone information. Implementations shall not usecompareTo(…)
because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.- Specified by:
compare
in classComparisonFilter<R>
-