Package pixy.image.png
Enum ChunkType
java.lang.Object
java.lang.Enum<ChunkType>
pixy.image.png.ChunkType
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ChunkType>
,java.lang.constant.Constable
public enum ChunkType extends java.lang.Enum<ChunkType>
Define PNG chunk types
- Version:
- 1.0 10/16/2012
- Author:
- Wen Yu, yuwen_66@yahoo.com
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChunkType.Attribute
We made Attribute public for general usage outside of Attribute class. -
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static boolean
containsIgnoreCase(java.lang.String name)
static ChunkType
fromInt(int value)
static ChunkType
fromString(java.lang.String name)
ChunkType.Attribute
getAttribute()
java.lang.String
getName()
int
getRanking()
Ranking is used for sorting chunks to make them conform to PNG specification before passing them to PNGWriter.int
getValue()
java.lang.String
toString()
static ChunkType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ChunkType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getAttribute
-
getName
public java.lang.String getName() -
getValue
public int getValue() -
getRanking
public int getRanking()Ranking is used for sorting chunks to make them conform to PNG specification before passing them to PNGWriter.- Returns:
- The ranking of the chunk for this chunk type
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Enum<ChunkType>
-
containsIgnoreCase
public static boolean containsIgnoreCase(java.lang.String name)- Parameters:
name
- A String to test against the names of the chunks- Returns:
- True if a match is found, otherwise false.
-
fromString
-
fromInt
-