Class AttributeMatch<T>
java.lang.Object
io.superdurable.dex.AttributeMatch<T>
- Type Parameters:
T- the Attribute value type
Describes a scalar Attribute predicate.
Create a match with a static factory and pass it to Client.waitForAttributeMatch(String, Attribute, AttributeMatch, WaitForAttributeOptions).
String and Boolean Attributes support equality operators. Integer and floating-point Attributes
support every operator. A missing Attribute never matches.
AttributeMatch<Long> changed = AttributeMatch.greaterThan(3L);
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AttributeMatch<T> equalTo(T operand) Creates an equality match.static <T> AttributeMatch<T> greaterThan(T operand) Creates a numeric greater-than match.static <T> AttributeMatch<T> greaterThanOrEqual(T operand) Creates a numeric greater-than-or-equal match.static <T> AttributeMatch<T> lessThan(T operand) Creates a numeric less-than match.static <T> AttributeMatch<T> lessThanOrEqual(T operand) Creates a numeric less-than-or-equal match.static <T> AttributeMatch<T> notEqualTo(T operand) Creates a not-equal match.
-
Method Details
-
equalTo
Creates an equality match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the scalar value to compare- Returns:
- an equality match
-
notEqualTo
Creates a not-equal match. A missing Attribute does not match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the scalar value to compare- Returns:
- a not-equal match
-
greaterThan
Creates a numeric greater-than match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the numeric value to compare- Returns:
- a greater-than match
-
greaterThanOrEqual
Creates a numeric greater-than-or-equal match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the numeric value to compare- Returns:
- a greater-than-or-equal match
-
lessThan
Creates a numeric less-than match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the numeric value to compare- Returns:
- a less-than match
-
lessThanOrEqual
Creates a numeric less-than-or-equal match.- Type Parameters:
T- the Attribute value type- Parameters:
operand- the numeric value to compare- Returns:
- a less-than-or-equal match
-