Class AttributeImpl

    • Constructor Detail

      • AttributeImpl

        protected AttributeImpl()
      • AttributeImpl

        public AttributeImpl​(String name)
      • AttributeImpl

        public AttributeImpl​(String name,
                             String value)
      • AttributeImpl

        public AttributeImpl​(String name,
                             Set<String> values)
      • AttributeImpl

        public AttributeImpl​(String name,
                             String[] values)
    • Method Detail

      • getValueCount

        public int getValueCount()
        Description copied from interface: Attribute
        Get a count of the number of values this attribute has (0-n).
        Specified by:
        getValueCount in interface Attribute
        Returns:
        The value count.
      • getName

        public String getName()
        Description copied from interface: Attribute
        Get the name of this attribute.
        Specified by:
        getName in interface Attribute
        Returns:
        The name.
      • getValue

        public String getValue()
        Description copied from interface: Attribute
        Get the first value from the Set of attribute values, or null if the attribute has no values. This is a shorthand method that should be useful for single-valued attributes, but note that there are no guarantees about which value is returned in the case that there are multiple values. The value returned will be whichever value the underlying Set implementation returns first.
        Specified by:
        getValue in interface Attribute
        Returns:
        The attribute value.
      • getValues

        public Set<String> getValues()
        Description copied from interface: Attribute
        Get the Set of values for this attribute. The Set returned is a copy of the original; changes to this Set will not affect the original.
        Specified by:
        getValues in interface Attribute
        Returns:
        The attribute values Set.
      • getValuesAsArray

        public String[] getValuesAsArray()
        Description copied from interface: Attribute
        Return the attributes values as a String array. Note that this array can be zero-length in the case that there are no values.
        Specified by:
        getValuesAsArray in interface Attribute
        Returns:
        The attribute values array.
      • clear

        public void clear()
        Specified by:
        clear in interface Attribute