public class ImageType extends Object implements IResourceType
Represents one supportable image type (format), supports both raster and vector formats
Constructor and Description |
---|
ImageType() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(ImageType other)
Determines whether this instance is equal with specified "ImageType"
instance
|
boolean |
equals(Object obj)
Determines whether this instance is equal with specified uncasted object,
which presumably is another "ImageType" instance
|
static ImageType |
getBmp()
BMP image type
|
static ImageType |
getEmf()
EMF (Enhanced MetaFile) vector image type
|
String |
getFileExtension()
File extension (without leading dot character) of a particular image type
in lower case.
|
String |
getFormalName()
Returns a formal name of this image format.
|
static ImageType |
getGif()
GIF image type
|
static ImageType |
getIcon()
ICON image type
|
static ImageType |
getJpeg()
JPEG image type
|
String |
getMimeCode()
MIME code of a particular image type as a string.
|
static ImageType |
getPng()
PNG image type
|
static ImageType |
getSvg()
SVG vector image type
|
static ImageType |
getTiff()
TIFF (Tagged Image File Format) raster image type
|
static ImageType |
getUndefined()
Undefined image type - special value, which should not normally occur
|
static ImageType |
getWmf()
WMF (Windows MetaFile) vector image type
|
int |
hashCode()
Returns a hash-code, which is an immutable number for this specific
instance
|
boolean |
isVector()
Indicates whether this particular format is vector (true) or raster
(false)
|
static boolean |
op_Equality(ImageType first,
ImageType second)
Defines whether two specific ImageType instances are equal
|
static boolean |
op_Inequality(ImageType first,
ImageType second)
Defines whether two specific ImageType instances are not equal
|
static ImageType |
parseFromFilenameWithExtension(String filename)
Returns ImageType value, which is equivalent of filename extension, which
is extracted from specified filename
|
static ImageType |
parseFromMime(String mimeCode)
Returns ImageType value, which is equivalent of specified MIME code
|
String |
toString()
Returns a FormalName property
|
public final boolean equals(ImageType other)
Determines whether this instance is equal with specified "ImageType" instance
other
- Other ImageType instance to check on equality with thispublic boolean equals(Object obj)
Determines whether this instance is equal with specified uncasted object, which presumably is another "ImageType" instance
public static ImageType getBmp()
BMP image type
public static ImageType getEmf()
EMF (Enhanced MetaFile) vector image type
public final String getFileExtension()
File extension (without leading dot character) of a particular image type in lower case. For the Undefined type returns a string 'unsefined'.
getFileExtension
in interface IResourceType
public final String getFormalName()
Returns a formal name of this image format. Never reurns NULL. If instance is not corrupted, never throws an exception.
getFormalName
in interface IResourceType
public static ImageType getGif()
GIF image type
public static ImageType getIcon()
ICON image type
public static ImageType getJpeg()
JPEG image type
public final String getMimeCode()
MIME code of a particular image type as a string. For the Undefined type returns a string 'unsefined'.
getMimeCode
in interface IResourceType
public static ImageType getPng()
PNG image type
public static ImageType getSvg()
SVG vector image type
public static ImageType getTiff()
TIFF (Tagged Image File Format) raster image type
public static ImageType getUndefined()
Undefined image type - special value, which should not normally occur
public static ImageType getWmf()
WMF (Windows MetaFile) vector image type
public int hashCode()
Returns a hash-code, which is an immutable number for this specific instance
public final boolean isVector()
Indicates whether this particular format is vector (true) or raster (false)
public static boolean op_Equality(ImageType first, ImageType second)
Defines whether two specific ImageType instances are equal
first
- First ImageType instance to checksecond
- Second ImageType instance to checkpublic static boolean op_Inequality(ImageType first, ImageType second)
Defines whether two specific ImageType instances are not equal
first
- First ImageType instance to checksecond
- Second ImageType instance to checkpublic static ImageType parseFromFilenameWithExtension(String filename)
Returns ImageType value, which is equivalent of filename extension, which is extracted from specified filename
filename
- Arbitrary filename, can be a relative or full pathpublic static ImageType parseFromMime(String mimeCode)
Returns ImageType value, which is equivalent of specified MIME code
mimeCode
- Arbitrary MIME-code