Package com.xinapse.util
Enum Class IntensityRelation
- All Implemented Interfaces:
Serializable
,Comparable<IntensityRelation>
,Constable
,Icon
An enumeration of possible intensity relationships.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A Button for setting an intensity relation.static class
Class for generating JPanels for selecting an IntensityRelation.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA feature is hyperintense.A feature is hypointense.A feature may be hyperintense or hypointense. -
Field Summary
Modifier and TypeFieldDescriptionstatic final IntensityRelation
The default IntensityRelation.static final org.apache.commons.cli.Option
An Option that can be used for command-line processing of an optional list of intensity relations. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Returns a String describing thisIntensityRelation
in detail.int
int
static IntensityRelation
Returns theIntensityRelation
specified by the argument.static void
Run the self-test of the IntensityRelation class.void
static IntensityRelation[]
Get an array of IntenstyRelations from a String comma-separated list of relations.static String
toPreferencesString
(IntensityRelation[] relations) Returns a String containing the array ofIntensityRelation
s as a comma-separated list, suitable for saving the relations in the Preferences.toString()
Returns a short String describing thisIntensityRelation
.static IntensityRelation
Returns the enum constant of this class with the specified name.static IntensityRelation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
A feature may be hyperintense or hypointense. -
HYPERINTENSE
A feature is hyperintense. -
HYPOINTENSE
A feature is hypointense.
-
-
Field Details
-
DEFAULT_INTENSITY_RELATION
The default IntensityRelation. -
OPTION
public static final org.apache.commons.cli.Option OPTIONAn Option that can be used for command-line processing of an optional list of intensity relations.
-
-
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
-
getDescription
Returns a String describing thisIntensityRelation
in detail.- Returns:
- a java.lang.String describing this
IntensityRelation
in detail.
-
toString
Returns a short String describing thisIntensityRelation
.- Overrides:
toString
in classEnum<IntensityRelation>
- Returns:
- a java.lang.String describing this
IntensityRelation
.
-
getInstance
Returns theIntensityRelation
specified by the argument.- Parameters:
s
- a String describing the IntensityRelation.- Returns:
- the
IntensityRelation
specified by the argument. - Throws:
ParseException
- if theIntensityRelation
cannot be parsed from the argument.
-
parseRelations
Get an array of IntenstyRelations from a String comma-separated list of relations.- Parameters:
s
- a comma-separated list of relations, where entries with two adjacent commas are interpreted asUNKNOWN
.- Returns:
- an array of
IntensityRelation
s. - Throws:
ParseException
- if any of theIntensityRelation
s cannot be parsed from the argument.
-
toPreferencesString
Returns a String containing the array ofIntensityRelation
s as a comma-separated list, suitable for saving the relations in the Preferences.- Parameters:
relations
- the array ofIntensityRelation
s.- Returns:
- a comma-separated list of
IntensityRelation
s.
-
main
Run the self-test of the IntensityRelation class.- Parameters:
args
- ignored.
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
paintIcon
-