@Status(stage=PRODUCTION, unitTests=ABSENT) @Review(by="Kees Schotanus", at="2010-08-15", reason="Initial review") public enum ElectricCharge extends Enum<ElectricCharge>
| Enum Constant and Description |
|---|
MINUS_ONE
-1.
|
MINUS_ONE_THIRD
-1/3.
|
ONE_THIRD
1/3.
|
TWO_THIRDS
TWO_THIRDS.
|
ZERO
Zero.
|
| Modifier and Type | Method and Description |
|---|---|
CRational |
getCharge()
Gets the electric charge as a fraction..
|
String |
toString()
Creates a String representation of this ElectricCharge.
|
static ElectricCharge |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ElectricCharge[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ElectricCharge MINUS_ONE
public static final ElectricCharge MINUS_ONE_THIRD
public static final ElectricCharge ZERO
public static final ElectricCharge ONE_THIRD
public static final ElectricCharge TWO_THIRDS
public static ElectricCharge[] values()
for (ElectricCharge c : ElectricCharge.values()) System.out.println(c);
public static ElectricCharge 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 getCharge()
public String toString()
toString in class Enum<ElectricCharge>CRational.toString()Copyright © 2008–2017. All rights reserved.