Class SetValueFormatter

java.lang.Object
org.monte.media.tiff.SetValueFormatter
All Implemented Interfaces:
ValueFormatter

public class SetValueFormatter extends Object implements ValueFormatter
Formats integer values as a set.
Author:
Werner Randelshofer
  • Constructor Details

    • SetValueFormatter

      public SetValueFormatter(Object... set)
      Creates a new enumeration. The enumeration consists of a list of String=Integer, String=Integer Integer, or String=String pairs.

      • String=Integer. If only one integer is provided, it specifies the bits which must be set.
      • String=Integer Integer. If two integers are provided, the second value specifies a bit mask.
      • String=String. If a String is provided, it specifies the String that must be set.
  • Method Details

    • format

      public Object format(Object value)
      Description copied from interface: ValueFormatter
      Formats the specified value. If the value is of the desired type, it is replaced by an object which can be handled easier. For example, an integer value by a descriptive String.
      Specified by:
      format in interface ValueFormatter
    • prettyFormat

      public Object prettyFormat(Object value)
      Description copied from interface: ValueFormatter
      Formats the specified value in a human readable format.
      Specified by:
      prettyFormat in interface ValueFormatter
    • descriptionFormat

      public String descriptionFormat(Object value)
      Description copied from interface: ValueFormatter
      Describes the data. Returns null if no description is available.
      Specified by:
      descriptionFormat in interface ValueFormatter