- All Implemented Interfaces:
Serializable
,Comparable<SVGVersion>
,Constable
SVGVersion is used to describe the version number of the SVG specification
that a generated SVG file will conform to.
- Since:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe version 1.1 of the SVG specification.The version 1.2 of the SVG specification. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Return the value of this enumstatic SVGVersion[]
Used to retrieve the list of supported versions.static SVGVersion
of
(int ordinal) Returns the enum constant for the given ordinal (its position in the enum declaration).toString()
Get the string representation of this version.static SVGVersion
Returns the enum constant of this class with the specified name.static SVGVersion[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VERSION_1_1
-
VERSION_1_2
-
-
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
-
getValue
public int getValue()Return the value of this enum- Returns:
- the value
-
of
Returns the enum constant for the given ordinal (its position in the enum declaration).- Parameters:
ordinal
- the position in the enum declaration, starting from zero- Returns:
- the enum constant for the given ordinal
-
getVersions
Used to retrieve the list of supported versions. SeeSVGSurface.restrictToVersion(SVGVersion)
.- Returns:
- supported version list
- Since:
- 1.2
-
toString
Get the string representation of this version. This function will returnnull
if version isn't valid. SeegetVersions()
for a way to get the list of valid versions.- Overrides:
toString
in classEnum<SVGVersion>
- Returns:
- the string associated this version.
- Since:
- 1.2
-