Class Extensions


  • public final class Extensions
    extends Object
    Bean for an extension found in a schema element.
    • Constructor Detail

      • Extensions

        public Extensions()
        Creates a new extensions.
      • Extensions

        public Extensions​(String name,
                          List<String> values)
        Creates a new extensions.
        Parameters:
        name - of a single extension
        values - for that extension
    • Method Detail

      • getNames

        public Set<String> getNames()
        Returns the name.
        Returns:
        name
      • getValues

        public List<String> getValues​(String name)
        Returns the values for the extension with the supplied name.
        Parameters:
        name - of the extension
        Returns:
        values
      • getValue

        public String getValue​(String name)
        Returns a single string value for the extension with the supplied name. See getValues(String).
        Parameters:
        name - of the extension
        Returns:
        single string extension value
      • getAllValues

        public Map<String,​List<String>> getAllValues()
        Returns all the values in this extensions.
        Returns:
        map of name to values for every extension
      • addExtension

        public void addExtension​(String name)
        Adds an extension.
        Parameters:
        name - of the extension
      • addExtension

        public void addExtension​(String name,
                                 List<String> values)
        Adds an extension.
        Parameters:
        name - of the extension
        values - in the extension
      • size

        public int size()
        Returns the number of extensions in the underlying map.
        Returns:
        number of extensions
      • isEmpty

        public boolean isEmpty()
        Returns whether the number of extensions is zero.
        Returns:
        whether the number of extensions is zero
      • format

        public String format()
        Returns this extension as formatted string per RFC 4512.
        Returns:
        formatted string
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object