Enum Class ConditionFactory.Op

java.lang.Object
java.lang.Enum<ConditionFactory.Op>
org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op
All Implemented Interfaces:
Serializable, Comparable<ConditionFactory.Op>, Constable
Enclosing class:
ConditionFactory

public static enum ConditionFactory.Op extends Enum<ConditionFactory.Op>
This is the operation that ConditionFactory.KeyValueCondition uses to match.
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • Op

      private Op(BiPredicate<String,String> func)
      Create a new string operation.
      Parameters:
      func - The function to apply during eval(String, String).
    • Op

      private Op(IntFunction<Boolean> comparatorResult)
      Create a new float operation that compares two float values
      Parameters:
      comparatorResult - A function to map the result of the comparison
    • Op

      private Op(ConditionFactory.Op negate)
      Create a new Op by negating an other op.
      Parameters:
      negate - inverse operation
  • Method Details

    • values

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

      public static ConditionFactory.Op valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • eval

      public boolean eval(String testString, String prototypeString)
      Evaluates a value against a reference string.
      Parameters:
      testString - The value. May be null
      prototypeString - The reference string-
      Returns:
      true if and only if this operation matches for the given value/reference pair.