Enum DistanceType

java.lang.Object
java.lang.Enum<DistanceType>
org.rcsb.strucmotif.domain.motif.DistanceType
All Implemented Interfaces:
Serializable, Comparable<DistanceType>, java.lang.constant.Constable

public enum DistanceType extends Enum<DistanceType>
Binned representation of the distance between residues.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static DistanceType[] 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 DistanceType 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
    • getIntRepresentation

      public int getIntRepresentation()
      Convert enum to distance value in Angstrom (basically the lower bound of the interval).
      Returns:
      lower bound of distances landing in this bin
    • ofDistance

      public static DistanceType ofDistance(float distance)
      Convert distance in Angstrom to enum value. Will cap results into interval of possible values.
      Parameters:
      distance - raw distance
      Returns:
      the corresponding bin
    • ofIntRepresentation

      public static DistanceType ofIntRepresentation(int ordinal)
      Convert the ordinal to enum value. Somewhat trivial. Will cap results into interval of possible values.
      Parameters:
      ordinal - the ordinal to get
      Returns:
      the corresponding bin