Class DefaultFormat

java.lang.Object
java.text.Format
org.apache.sis.io.DefaultFormat
All Implemented Interfaces:
Serializable, Cloneable

final class DefaultFormat extends Format
Created by CompoundFormat for parsing and formatting unlocalized numbers. This implementation use toString() and valueOf(…) methods instead than the java.text package because the former provide the best guarantees to format all significant digits.

Thread safety

The same instance can be safely used by many threads without synchronization on the part of the caller. Note that this is specific to DefaultFormat and generally not true for arbitrary Format classes.
Since:
0.3
Version:
1.0
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • INSTANCES

      private static final Format[] INSTANCES
      The array for storing singleton instances for types byte to double. The value at index 0 is reserved for the generic Number type.
    • type

      private final Class<?> type
      The type of the objects to parse.
  • Constructor Details

    • DefaultFormat

      private DefaultFormat(Class<?> type)
      Creates a new instance for parsing and formatting objects of the given type.
  • Method Details