Class AttributesImpl

  • All Implemented Interfaces:
    Attributes

    public final class AttributesImpl
    extends Object
    implements Attributes
    An **** partial **** implementation of the SAX-interface Attributes which allows attributes without values using NO_VALUE.
    Version:
    1.0
    Author:
    Ernst Reissner
    • Field Detail

      • NO_VALUE

        public static final String NO_VALUE
        Used as a value in name2value to signify that the corresponding attribute has no value. This is much better than simply unsing null. The latter would not allow to rule out a multiple attribute without a value.
      • name2value

        private final ListMap<String,​String> name2value
        Maps the name of an attribute to its value. The name must be a string. If there is a value (which is mandatory in xml) the value is also a string value. Otherwise it is NO_VALUE.
    • Constructor Detail

      • AttributesImpl

        AttributesImpl​(ListMap<String,​String> name2value)
        Creates a new empty AttributesImpl which represents the given attribute list.
        Parameters:
        name2value - a ListMap representing an attribute list, as specified for name2value.