Package loci.formats.codec
Enum Class CompressionType
- All Implemented Interfaces:
Serializable,Comparable<CompressionType>,java.lang.constant.Constable,loci.common.enumeration.CodedEnum
public enum CompressionType
extends Enum<CompressionType>
implements loci.common.enumeration.CodedEnum
An enumeration of compression types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intCode for the compression.private StringThe compression used.private static final Map<Integer, CompressionType> Map used to retrieve the compression type corresponding to the code. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCompressionType(int code, String compression) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompressionTypeget(int code) Retrieves the compression by reverse lookup of its "code".static CompressionTypeLook up the compression type by Codec instance.intgetCode()Implemented as specified by theCodedEnumI/F.Returns the compression.static CompressionTypeReturns the enum constant of this class with the specified name.static CompressionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNCOMPRESSED
-
ZLIB
-
CINEPAK
-
ANIMATION
-
H_263
-
SORENSON
-
SORENSON_3
-
MPEG_4
-
LZW
-
J2K
-
J2K_LOSSY
-
JPEG
-
-
Field Details
-
code
private int codeCode for the compression. -
compression
The compression used. -
lookup
Map used to retrieve the compression type corresponding to the code.
-
-
Constructor Details
-
CompressionType
Default constructor.- Parameters:
code- Integer "code" for the IFD type.compression- The type of compression.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
get
Retrieves the compression by reverse lookup of its "code".- Parameters:
code- The code to look up.- Returns:
- The
CompressionTypeinstance for thecodeornullif it does not exist.
-
getCode
public int getCode()Implemented as specified by theCodedEnumI/F.- Specified by:
getCodein interfaceloci.common.enumeration.CodedEnum- See Also:
-
getCompression
Returns the compression.- Returns:
- See above.
-
get
Look up the compression type by Codec instance.
-