Class AttributeMatch<T>

java.lang.Object
io.superdurable.dex.AttributeMatch<T>
Type Parameters:
T - the Attribute value type

public final class AttributeMatch<T> extends Object
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 Details

    • equalTo

      public static <T> AttributeMatch<T> equalTo(T operand)
      Creates an equality match.
      Type Parameters:
      T - the Attribute value type
      Parameters:
      operand - the scalar value to compare
      Returns:
      an equality match
    • notEqualTo

      public static <T> AttributeMatch<T> notEqualTo(T operand)
      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

      public static <T> AttributeMatch<T> greaterThan(T operand)
      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

      public static <T> AttributeMatch<T> greaterThanOrEqual(T operand)
      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

      public static <T> AttributeMatch<T> lessThan(T operand)
      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

      public static <T> AttributeMatch<T> lessThanOrEqual(T operand)
      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