Package pl.poznan.put.torsion.range
Enum RangeDifference
- All Implemented Interfaces:
Serializable
,Comparable<RangeDifference>
,java.lang.constant.Constable
A distance between
TorsionRange
objects.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic RangeDifference
fromValue
(int value) Parses value 0, 1, 2, or 3 as EQUAL, SIMILAR, DIFFERENT and OPPOSITE respectively.int
getValue()
static RangeDifference
Returns the enum constant of this type with the specified name.static RangeDifference[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EQUAL
-
SIMILAR
-
DIFFERENT
-
OPPOSITE
-
INVALID
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
fromValue
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.
-