@Status(stage=PRODUCTION, unitTests=ABSENT) @Review(by="Kees Schotanus", at="2010-08-17", reason="Initial review") public enum Spin extends Enum<Spin>
Enum Constant and Description |
---|
MINUS_ONE_HALF
-1/2.
|
ONE
1.
|
ONE_HALF
1/2.
|
TWO
2.
|
ZERO
0.
|
Modifier and Type | Method and Description |
---|---|
CRational |
getSpin()
Gets the Spin as a fraction.
|
String |
toString()
Creates a String representation of this Spin.
|
static Spin |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Spin[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Spin MINUS_ONE_HALF
public static final Spin ZERO
public static final Spin ONE_HALF
public static final Spin ONE
public static final Spin TWO
public static Spin[] values()
for (Spin c : Spin.values()) System.out.println(c);
public static Spin valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic CRational getSpin()
public String toString()
toString
in class Enum<Spin>
CRational.toString()
Copyright © 2008–2018. All rights reserved.