Enum ResolutionUnit

java.lang.Object
java.lang.Enum<ResolutionUnit>
org.apache.xmlgraphics.image.writer.ResolutionUnit
All Implemented Interfaces:
Serializable, Comparable<ResolutionUnit>, java.lang.constant.Constable

public enum ResolutionUnit extends Enum<ResolutionUnit>
Enumeration for resolution units used by images; 1 for None, 2 for Inch and 3 for Centimeter.
  • Enum Constant Details

  • Method Details

    • values

      public static ResolutionUnit[] 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

      public static ResolutionUnit 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
    • getValue

      public int getValue()
      Retrieves the numeric value of the resolution unit.
      Returns:
      1, 2 or 3.
    • getDescription

      public String getDescription()
      Retrieves the standard textual description of the resolution unit.
      Returns:
      None, Inch or Centimeter.
    • get

      public static ResolutionUnit get(int value)
      Reverse lookup by value.
      Parameters:
      value - the numeric value of the resolution unit
      Returns:
      the resolution unit