Package adams.data.image.transformer
Enum ImageType.Type
- java.lang.Object
-
- java.lang.Enum<ImageType.Type>
-
- adams.data.image.transformer.ImageType.Type
-
- All Implemented Interfaces:
EnumWithCustomDisplay<ImageType.Type>
,EnumWithCustomParsing<ImageType.Type>
,Serializable
,Comparable<ImageType.Type>
- Enclosing class:
- ImageType
public static enum ImageType.Type extends Enum<ImageType.Type> implements EnumWithCustomDisplay<ImageType.Type>
The types of color quantizers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description TYPE_3BYTE_BGR
TYPE_4BYTE_ABGR
TYPE_4BYTE_ABGR_PRE
TYPE_BYTE_BINARY
TYPE_BYTE_GRAY
TYPE_BYTE_INDEXED
TYPE_CUSTOM
TYPE_INT_ARGB
TYPE_INT_ARGB_PRE
TYPE_INT_BGR
TYPE_INT_RGB
TYPE_USHORT_555_RGB
TYPE_USHORT_565_RGB
TYPE_USHORT_GRAY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getType()
Returns the associated type.ImageType.Type
parse(String s)
Parses the given string and returns the associated enum.String
toDisplay()
Returns the human-readable display.String
toRaw()
Returns the raw enum string.String
toString()
Returns the display string.static String
toString(AbstractOption option, Object object)
Returns the enum as string.static ImageType.Type
type(int type)
Returns the enum type for the integer type, if possible.static ImageType.Type
valueOf(AbstractOption option, String str)
Returns an enum generated from the string.static ImageType.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static ImageType.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TYPE_3BYTE_BGR
public static final ImageType.Type TYPE_3BYTE_BGR
-
TYPE_4BYTE_ABGR
public static final ImageType.Type TYPE_4BYTE_ABGR
-
TYPE_4BYTE_ABGR_PRE
public static final ImageType.Type TYPE_4BYTE_ABGR_PRE
-
TYPE_BYTE_BINARY
public static final ImageType.Type TYPE_BYTE_BINARY
-
TYPE_BYTE_GRAY
public static final ImageType.Type TYPE_BYTE_GRAY
-
TYPE_BYTE_INDEXED
public static final ImageType.Type TYPE_BYTE_INDEXED
-
TYPE_CUSTOM
public static final ImageType.Type TYPE_CUSTOM
-
TYPE_INT_ARGB
public static final ImageType.Type TYPE_INT_ARGB
-
TYPE_INT_ARGB_PRE
public static final ImageType.Type TYPE_INT_ARGB_PRE
-
TYPE_INT_BGR
public static final ImageType.Type TYPE_INT_BGR
-
TYPE_INT_RGB
public static final ImageType.Type TYPE_INT_RGB
-
TYPE_USHORT_555_RGB
public static final ImageType.Type TYPE_USHORT_555_RGB
-
TYPE_USHORT_565_RGB
public static final ImageType.Type TYPE_USHORT_565_RGB
-
TYPE_USHORT_GRAY
public static final ImageType.Type TYPE_USHORT_GRAY
-
-
Method Detail
-
values
public static ImageType.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageType.Type c : ImageType.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageType.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getType
public int getType()
Returns the associated type.- Returns:
- the type
-
toDisplay
public String toDisplay()
Returns the human-readable display.- Specified by:
toDisplay
in interfaceEnumWithCustomDisplay<ImageType.Type>
- Returns:
- the display
-
toRaw
public String toRaw()
Returns the raw enum string.- Specified by:
toRaw
in interfaceEnumWithCustomDisplay<ImageType.Type>
- Returns:
- the raw enum string
-
toString
public String toString()
Returns the display string.- Overrides:
toString
in classEnum<ImageType.Type>
- Returns:
- the display string
-
type
public static ImageType.Type type(int type)
Returns the enum type for the integer type, if possible.- Parameters:
type
- the type to get the enum for- Returns:
- the enum, null if not found
-
parse
public ImageType.Type parse(String s)
Parses the given string and returns the associated enum.- Specified by:
parse
in interfaceEnumWithCustomParsing<ImageType.Type>
- Parameters:
s
- the string to parse- Returns:
- the enum or null if not found
-
toString
public static String toString(AbstractOption option, Object object)
Returns the enum as string.- Parameters:
option
- the current optionobject
- the enum object to convert- Returns:
- the generated string
-
valueOf
public static ImageType.Type valueOf(AbstractOption option, String str)
Returns an enum generated from the string.- Parameters:
option
- the current optionstr
- the string to convert to an enum- Returns:
- the generated enum or null in case of error
-
-