Package com.xinapse.util
Enum Class IntensityRelation
- All Implemented Interfaces:
Serializable,Comparable<IntensityRelation>,Constable,Icon
An enumeration of possible intensity relationships.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Button for setting an intensity relation.static classClass 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 ConstantsEnum ConstantDescriptionA feature is hyperintense.A feature is hypointense.A feature may be hyperintense or hypointense. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntensityRelationThe default IntensityRelation.static final org.apache.commons.cli.OptionAn Option that can be used for command-line processing of an optional list of intensity relations. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns a String describing thisIntensityRelationin detail.intintstatic IntensityRelationReturns theIntensityRelationspecified by the argument.static voidRun the self-test of the IntensityRelation class.voidstatic IntensityRelation[]Get an array of IntenstyRelations from a String comma-separated list of relations.static StringtoPreferencesString(IntensityRelation[] relations) Returns a String containing the array ofIntensityRelations as a comma-separated list, suitable for saving the relations in the Preferences.toString()Returns a short String describing thisIntensityRelation.static IntensityRelationReturns 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 thisIntensityRelationin detail.- Returns:
- a java.lang.String describing this
IntensityRelationin detail.
-
toString
Returns a short String describing thisIntensityRelation.- Overrides:
toStringin classEnum<IntensityRelation>- Returns:
- a java.lang.String describing this
IntensityRelation.
-
getInstance
Returns theIntensityRelationspecified by the argument.- Parameters:
s- a String describing the IntensityRelation.- Returns:
- the
IntensityRelationspecified by the argument. - Throws:
ParseException- if theIntensityRelationcannot 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
IntensityRelations. - Throws:
ParseException- if any of theIntensityRelations cannot be parsed from the argument.
-
toPreferencesString
Returns a String containing the array ofIntensityRelations as a comma-separated list, suitable for saving the relations in the Preferences.- Parameters:
relations- the array ofIntensityRelations.- Returns:
- a comma-separated list of
IntensityRelations.
-
main
Run the self-test of the IntensityRelation class.- Parameters:
args- ignored.
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
paintIcon
-