Klasse ComparisonPredicates
java.lang.Object
org.apache.sling.resource.filter.impl.predicates.ComparisonPredicates
Predicates to handle comparisons that are defined in the filter language
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Predicate<org.apache.sling.api.resource.Resource> contains(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arraysstatic Predicate<org.apache.sling.api.resource.Resource> containsAny(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arraysstatic Predicate<org.apache.sling.api.resource.Resource> gt(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparisonstatic Predicate<org.apache.sling.api.resource.Resource> gte(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparisonstatic Predicate<org.apache.sling.api.resource.Resource> in(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arraysstatic Predicate<org.apache.sling.api.resource.Resource> is(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings.static Predicate<org.apache.sling.api.resource.Resource> isNot(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings.static Predicate<org.apache.sling.api.resource.Resource> like(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings.static Predicate<org.apache.sling.api.resource.Resource> lt(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparisonstatic Predicate<org.apache.sling.api.resource.Resource> lte(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparison
-
Konstruktordetails
-
ComparisonPredicates
public ComparisonPredicates()
-
-
Methodendetails
-
is
public static Predicate<org.apache.sling.api.resource.Resource> is(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings.- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if right hand String is equal to left hand String
-
isNot
public static Predicate<org.apache.sling.api.resource.Resource> isNot(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings.- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if right hand String is equal to left hand String
-
like
public static Predicate<org.apache.sling.api.resource.Resource> like(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to Strings. Right hand value is treated as a Regular expression.- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if right hand value pattern matches the left hand value
-
gt
public static Predicate<org.apache.sling.api.resource.Resource> gt(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparison- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand value is greater than right hand value
-
gte
public static Predicate<org.apache.sling.api.resource.Resource> gte(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparison- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand value is greater than or equal to right hand value
-
lt
public static Predicate<org.apache.sling.api.resource.Resource> lt(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparison- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand value is less than right hand value
-
lte
public static Predicate<org.apache.sling.api.resource.Resource> lte(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Values are converted to a Number, and then additionally converted to a common type as the basis of comparison- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand value is less than or equal to right hand value
-
contains
public static Predicate<org.apache.sling.api.resource.Resource> contains(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arrays- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand values are a subset of right hand values
-
containsAny
public static Predicate<org.apache.sling.api.resource.Resource> containsAny(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arrays- Parameter:
lhs- Function which provides comparison valuerhs- Function which provides comparison value- Gibt zurück:
- true if the left hand values matches any of the right hand values
-
in
public static Predicate<org.apache.sling.api.resource.Resource> in(Function<org.apache.sling.api.resource.Resource, Object> lhs, Function<org.apache.sling.api.resource.Resource, Object> rhs) Right and Left values are converted to String arrays- Parameter:
lhs- Function which provides value for comparisonrhs- Function which provides value for comparison- Gibt zurück:
- true if left hand values are a subset of right hand values
-