Package adams.data.jai
Enum ImageType
- java.lang.Object
-
- java.lang.Enum<ImageType>
-
- adams.data.jai.ImageType
-
- All Implemented Interfaces:
EnumWithCustomDisplay<ImageType>,EnumWithCustomParsing<ImageType>,Serializable,Comparable<ImageType>
public enum ImageType extends Enum<ImageType> implements EnumWithCustomDisplay<ImageType>
The type of the image to create.- Version:
- $Revision: 9700 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExtension()Returns the associated extension.StringgetType()Returns the ImageMagick type.booleanmatches(File file)Checks whether the file matches the extension of this item.booleanmatches(String filename)Checks whether the file matches the extension of this item.ImageTypeparse(String s)Parses the given string and returns the associated enum.StringtoDisplay()Returns the display string.StringtoRaw()Returns the raw enum string.StringtoString()Returns the display string.static StringtoString(AbstractOption option, Object object)Returns the enum as string.static ImageTypevalueOf(AbstractOption option, String str)Returns an enum generated from the string.static ImageTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ImageType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ImageType[] 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 c : ImageType.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 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
-
toDisplay
public String toDisplay()
Returns the display string.- Specified by:
toDisplayin interfaceEnumWithCustomDisplay<ImageType>- Returns:
- the display string
-
toRaw
public String toRaw()
Returns the raw enum string.- Specified by:
toRawin interfaceEnumWithCustomDisplay<ImageType>- Returns:
- the raw enum string
-
toString
public String toString()
Returns the display string.
-
getType
public String getType()
Returns the ImageMagick type.- Returns:
- the type
-
getExtension
public String getExtension()
Returns the associated extension.- Returns:
- the extension
-
matches
public boolean matches(File file)
Checks whether the file matches the extension of this item.- Parameters:
file- the file to check- Returns:
- true if the extensions match
-
matches
public boolean matches(String filename)
Checks whether the file matches the extension of this item.- Parameters:
filename- the file to check- Returns:
- true if the extensions match
-
parse
public ImageType parse(String s)
Parses the given string and returns the associated enum.- Specified by:
parsein interfaceEnumWithCustomParsing<ImageType>- 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 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
-
-