Package com.xinapse.image
Enum Class ComplexMode
- All Implemented Interfaces:
Serializable,Comparable<ComplexMode>,Constable
An enumeration of the possible display/calculation modes for complex numbers.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComplexModeThe defaultComplexModefor applications. -
Method Summary
Modifier and TypeMethodDescriptionstatic ComplexModegetInstance(String modeString) Returns theComplexModecorresponding to the suppliedStringargument.static ComplexModegetPreferredMode(Preferences prefs) Returns theComplexModeset in the supplied Preferences, or the default ComplexMode.static voidsavePreferences(ComplexMode mode, Preferences prefs) Saves the suppliedComplexModeto the user's Preferences as the user's preferredComplexMode.toString()Returns aStringdescribing this ComplexMode.static ComplexModeReturns the enum constant of this class with the specified name.static ComplexMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REAL
Selects the real part of a complex number. -
IMAGINARY
Selects the imaginary part of a complex number. -
MAGNITUDE
Selects the magnitude of a complex number. -
PHASE
Selects the phase of a complex number.
-
-
Field Details
-
DEFAULT_COMPLEX_MODE
The defaultComplexModefor applications.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getPreferredMode
Returns theComplexModeset in the supplied Preferences, or the default ComplexMode.- Parameters:
prefs- the Preferences from which the ComplexMode is to be retrieved.- Returns:
- the
ComplexModegotten from the user's preferences, or the default if not set in the user's Preferences.
-
savePreferences
Saves the suppliedComplexModeto the user's Preferences as the user's preferredComplexMode.- Parameters:
mode- theComplexModethat the user most often works with, and which will be set as the default to use when this Class loads.prefs- the user Preferences.
-
getInstance
Returns theComplexModecorresponding to the suppliedStringargument.- Parameters:
modeString- aStringdescribing theComplexMode. One of:- "Real"
- "Imaginary"
- "Magnitude"
- "Phase"
- Returns:
- a
ComplexModeaccording to the suppliedString. - Throws:
IllegalArgumentException- if themodeStringis invalid.
-
toString
Returns aStringdescribing this ComplexMode.- Overrides:
toStringin classEnum<ComplexMode>- Returns:
- a
Stringdescribing this ComplexMode.
-