Enum RangeDifference

java.lang.Object
java.lang.Enum<RangeDifference>
pl.poznan.put.torsion.range.RangeDifference
All Implemented Interfaces:
Serializable, Comparable<RangeDifference>, java.lang.constant.Constable

public enum RangeDifference extends Enum<RangeDifference>
A distance between TorsionRange objects.
  • Enum Constant Details

  • Method Details

    • values

      public static RangeDifference[] 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 RangeDifference 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
    • fromValue

      public static RangeDifference fromValue(int value)
      Parses value 0, 1, 2, or 3 as EQUAL, SIMILAR, DIFFERENT and OPPOSITE respectively. Value different to 0, 1, 2 or 3 results in INVALID.
      Parameters:
      value - A value of 0, 1, 2 or 3 (all other are treated as invalid).
      Returns:
      An instance of this enum.
    • getValue

      public int getValue()
      Returns:
      0 for EQUAL, 1 for SIMILAR, 2 for DIFFERENT, 3 for OPPOSITE and -1 for INVALID.