Interface UnitFormatter

  • All Known Implementing Classes:
    BaseUnitFormatter

    public interface UnitFormatter
    An interface that is similar to UnitFormat but elides mutating methods.

    It is used to protect global or shared UnitFormat instances from being changed inadvertently.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String format​(Unit<?> unit)  
      Appendable format​(Unit<?> unit, Appendable appendable)  
      Unit<?> parse​(CharSequence csq)  
      Unit<?> parse​(CharSequence csq, ParsePosition pos)  
    • Method Detail

      • format

        Appendable format​(Unit<?> unit,
                          Appendable appendable)
                   throws IOException
        Throws:
        IOException
      • format

        String format​(Unit<?> unit)
      • parse

        Unit<?> parse​(CharSequence csq,
                      ParsePosition pos)
               throws IllegalArgumentException,
                      MeasurementParseException
        Throws:
        IllegalArgumentException
        MeasurementParseException
      • parse

        Unit<?> parse​(CharSequence csq)
               throws MeasurementParseException
        Throws:
        MeasurementParseException