java.lang.Object
java.lang.Enum<RangeType>
org.faktorips.runtime.internal.tableindex.RangeType
All Implemented Interfaces:
Serializable, Comparable<RangeType>, java.lang.constant.Constable

public enum RangeType extends Enum<RangeType>
Defines how the bounds of ranges in a RangeStructure are handled. Ranges in a RangeStructure are defined by only one value. The RangeType specifies whether this value is the upper or lower bound of the range. Ranges may thus be boundless/infinite.

Example: In a LOWER_BOUND_EQUAL RangeStructure by calling put(10, value1) and put(25, value2), two ranges are defined: [10..24] and [25..infinity]. When using UPPER_BOUND_EQUAL, however, the same calls define the ranges [-infinity..10] and [11..25].

See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static RangeType[] 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 RangeType 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
    • getValue

      public abstract <K extends Comparable<? super K>, V> V getValue(TreeMap<K,V> tree, K key)
      Retrieves the matching value from the given map using the given key. The strategy used to retrieve the value depends on the type of key. It differs in how the bounds of ranges are processed.
      Returns:
      the matching value in the given TreeMap or null if no matching value could be found.
    • findValue

      public abstract <K extends Comparable<? super K>, V> Optional<V> findValue(TreeMap<K,V> tree, K key)
      Retrieves the matching value from the given map using the given key. The strategy used to retrieve the value depends on the type of key. It differs in how the bounds of ranges are processed.
      Returns:
      the matching value in the given TreeMap or an empty Optional if no matching value could be found.