Enum DynamoDbComparisonType

java.lang.Object
java.lang.Enum<DynamoDbComparisonType>
org.evomaster.client.java.controller.dynamodb.DynamoDbComparisonType
All Implemented Interfaces:
Serializable, Comparable<DynamoDbComparisonType>, java.lang.constant.Constable

public enum DynamoDbComparisonType extends Enum<DynamoDbComparisonType>
Shared normalized comparison type used by DynamoDB parsers and heuristics.
  • Enum Constant Details

  • Method Details

    • values

      public static DynamoDbComparisonType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DynamoDbComparisonType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromToken

      public static DynamoDbComparisonType fromToken(String token)
      Maps a DynamoDB comparator token to a normalized comparison type.
      Parameters:
      token - comparator token from parsed expression
      Returns:
      normalized comparison type
    • toOperation

      public abstract ComparisonOperation<?> toOperation(String fieldName, Object value)
      Creates a comparison operation instance for this comparison type.
      Parameters:
      fieldName - field name coming from DynamoDB expression/condition
      value - comparison value
      Returns:
      concrete comparison operation
    • fromOperation

      public static DynamoDbComparisonType fromOperation(ComparisonOperation<?> operation)
      Maps a comparison operation back to its normalized comparison type.
      Parameters:
      operation - comparison operation instance
      Returns:
      associated comparison type
    • invert

      public abstract DynamoDbComparisonType invert()
      Returns the inverse of the current comparator.
      Returns:
      inverse comparison type
    • matchesOperation

      protected abstract boolean matchesOperation(ComparisonOperation<?> operation)
      Checks whether the given operation corresponds to this normalized comparison type.
      Parameters:
      operation - comparison operation instance
      Returns:
      whether the operation belongs to this comparison type