Class SimpleUnitFormat.ASCIIFormat

  • All Implemented Interfaces:
    javax.measure.format.UnitFormat
    Enclosing class:
    SimpleUnitFormat

    protected static final class SimpleUnitFormat.ASCIIFormat
    extends SimpleUnitFormat.DefaultFormat
    This class represents the ASCII format.
    • Constructor Detail

      • ASCIIFormat

        protected ASCIIFormat()
    • Method Detail

      • format

        public java.lang.Appendable format​(javax.measure.Unit<?> unit,
                                           java.lang.Appendable appendable)
                                    throws java.io.IOException
        Description copied from class: SimpleUnitFormat
        Formats the specified unit.
        Specified by:
        format in interface javax.measure.format.UnitFormat
        Overrides:
        format in class SimpleUnitFormat.DefaultFormat
        Parameters:
        unit - the unit to format.
        appendable - the appendable destination.
        Returns:
        The appendable destination passed in as appendable, with formatted text appended.
        Throws:
        java.io.IOException - if an error occurs.
      • isValidIdentifier

        public boolean isValidIdentifier​(java.lang.String name)
        Description copied from class: SimpleUnitFormat
        Indicates if the specified name can be used as unit identifier.
        Overrides:
        isValidIdentifier in class SimpleUnitFormat.DefaultFormat
        Parameters:
        name - the identifier to be tested.
        Returns:
        true if the name specified can be used as label or alias for this format;false otherwise.