org.jaitools.imageutils
Enum ImageDataType

java.lang.Object
  extended by java.lang.Enum<ImageDataType>
      extended by org.jaitools.imageutils.ImageDataType
All Implemented Interfaces:
Serializable, Comparable<ImageDataType>

public enum ImageDataType
extends Enum<ImageDataType>

Associates DataBuffer data type constants with Number classes.

Author:
michael

Enum Constant Summary
BYTE
           
DOUBLE
           
FLOAT
           
INT
           
SHORT
           
USHORT
           
 
Method Summary
 int getDataBufferType()
          Gets the DataBuffer integer constant for this data type.
 Class<? extends Number> getDataClass()
          Gets the class associated with this data type.
static ImageDataType getForClass(Class<? extends Number> clazz)
          Matches a data class.
static ImageDataType getForDataBufferType(int typeCode)
          Matches a DataBuffer type constant.
 String toString()
           
static ImageDataType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ImageDataType[] 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

BYTE

public static final ImageDataType BYTE

SHORT

public static final ImageDataType SHORT

USHORT

public static final ImageDataType USHORT

INT

public static final ImageDataType INT

FLOAT

public static final ImageDataType FLOAT

DOUBLE

public static final ImageDataType DOUBLE
Method Detail

values

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

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

valueOf

public static ImageDataType 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

getDataBufferType

public int getDataBufferType()
Gets the DataBuffer integer constant for this data type.


getDataClass

public Class<? extends Number> getDataClass()
Gets the class associated with this data type.


getForDataBufferType

public static ImageDataType getForDataBufferType(int typeCode)
Matches a DataBuffer type constant.

Parameters:
typeCode - the constant value to match
Returns:
the matching ImageDataType
Throws:
IllegalArgumentException - if no match exists

getForClass

public static ImageDataType getForClass(Class<? extends Number> clazz)
Matches a data class.

Parameters:
clazz - the data class to match
Returns:
the matching ImageDataType
Throws:
IllegalArgumentException - if the argument is null or if no match exists

toString

public String toString()
Overrides:
toString in class Enum<ImageDataType>


Copyright © 2009-2013. All Rights Reserved.