2.17.2: 2011-06-17

net.sf.basedb.core
Enum Image.Format

java.lang.Object
  extended by java.lang.Enum<Image.Format>
      extended by net.sf.basedb.core.Image.Format
All Implemented Interfaces:
Serializable, Comparable<Image.Format>
Enclosing class:
Image

public static enum Image.Format
extends Enum<Image.Format>

This enumeration is used to indicate the type of image.

Author:
Nicklas

Enum Constant Summary
JPEG
          The image is a JPEG image.
TIFF
          The image is a TIFF image.
UNKNOWN
          The image is in an unknown format.
 
Field Summary
private  String displayValue
          Returned by the toString method.
private  int value
          The integer value of this format.
private static Map<Integer,Image.Format> valueMapping
          Maps the integer that is stored in the database with an fileaction.
 
Method Summary
static Image.Format fromValue(int value)
          Get the Image.Format object when you know the integer code.
 int getValue()
          Get the integer value that is used when storing an Image.Format to the database.
 String toString()
           
static Image.Format valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Image.Format[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final Image.Format UNKNOWN
The image is in an unknown format.


TIFF

public static final Image.Format TIFF
The image is a TIFF image.


JPEG

public static final Image.Format JPEG
The image is a JPEG image.

Field Detail

valueMapping

private static final Map<Integer,Image.Format> valueMapping
Maps the integer that is stored in the database with an fileaction.


value

private final int value
The integer value of this format.


displayValue

private final String displayValue
Returned by the toString method.

Method Detail

values

public static Image.Format[] 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 (Image.Format c : Image.Format.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Image.Format 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 name
NullPointerException - if the argument is null

toString

public String toString()
Overrides:
toString in class Enum<Image.Format>

getValue

public int getValue()
Get the integer value that is used when storing an Image.Format to the database.

Returns:
The intger value of this action.

fromValue

public static Image.Format fromValue(int value)
Get the Image.Format object when you know the integer code.

Parameters:
value - The integer value.
Returns:
The Format for the integer value.

2.17.2: 2011-06-17