Enum Class IntensityRelation

java.lang.Object
java.lang.Enum<IntensityRelation>
com.xinapse.util.IntensityRelation
All Implemented Interfaces:
Serializable, Comparable<IntensityRelation>, Constable, Icon

public enum IntensityRelation extends Enum<IntensityRelation> implements Icon
An enumeration of possible intensity relationships.
  • Enum Constant Details

    • UNKNOWN

      public static final IntensityRelation UNKNOWN
      A feature may be hyperintense or hypointense.
    • HYPERINTENSE

      public static final IntensityRelation HYPERINTENSE
      A feature is hyperintense.
    • HYPOINTENSE

      public static final IntensityRelation HYPOINTENSE
      A feature is hypointense.
  • Field Details

    • DEFAULT_INTENSITY_RELATION

      public static final IntensityRelation DEFAULT_INTENSITY_RELATION
      The default IntensityRelation.
    • OPTION

      public static final org.apache.commons.cli.Option OPTION
      An Option that can be used for command-line processing of an optional list of intensity relations.
  • Method Details

    • values

      public static IntensityRelation[] 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

      public static IntensityRelation valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDescription

      public final String getDescription()
      Returns a String describing this IntensityRelation in detail.
      Returns:
      a java.lang.String describing this IntensityRelation in detail.
    • toString

      public String toString()
      Returns a short String describing this IntensityRelation.
      Overrides:
      toString in class Enum<IntensityRelation>
      Returns:
      a java.lang.String describing this IntensityRelation.
    • getInstance

      public static IntensityRelation getInstance(String s) throws ParseException
      Returns the IntensityRelation specified by the argument.
      Parameters:
      s - a String describing the IntensityRelation.
      Returns:
      the IntensityRelation specified by the argument.
      Throws:
      ParseException - if the IntensityRelation cannot be parsed from the argument.
    • parseRelations

      public static IntensityRelation[] parseRelations(String s) throws ParseException
      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 as UNKNOWN.
      Returns:
      an array of IntensityRelations.
      Throws:
      ParseException - if any of the IntensityRelations cannot be parsed from the argument.
    • toPreferencesString

      public static String toPreferencesString(IntensityRelation[] relations)
      Returns a String containing the array of IntensityRelations as a comma-separated list, suitable for saving the relations in the Preferences.
      Parameters:
      relations - the array of IntensityRelations.
      Returns:
      a comma-separated list of IntensityRelations.
    • main

      public static void main(String[] args)
      Run the self-test of the IntensityRelation class.
      Parameters:
      args - ignored.
    • getIconHeight

      public int getIconHeight()
      Specified by:
      getIconHeight in interface Icon
    • getIconWidth

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Specified by:
      paintIcon in interface Icon