Class Manifest.Attribute

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.String>
    Direct Known Subclasses:
    Manifest.ExistingAttribute
    Enclosing class:
    Manifest

    public static class Manifest.Attribute
    extends Manifest.BaseAttribute
    implements java.lang.Iterable<java.lang.String>
    An attribute for the manifest. Those attributes that are not nested into a section will be added to the "Main" section.
    • Constructor Summary

      Constructors 
      Constructor Description
      Attribute()
      Construct an empty attribute
      Attribute​(java.lang.String name, java.lang.String value)
      Construct a manifest by specifying its name and value
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.String value)
      Add a new value to this attribute - making it multivalued.
      boolean equals​(java.lang.Object rhs)  
      java.lang.String getKey()
      Get the attribute's Key - its name in lower case.
      java.lang.String getValue()
      Get the Attribute's value.
      int hashCode()  
      java.util.Iterator<java.lang.String> iterator()  
      void setName​(java.lang.String name)
      Set the Attribute's name; required
      void setValue​(java.lang.String value)
      Set the Attribute's value; required
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Attribute

        public Attribute()
        Construct an empty attribute
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String value)
        Construct a manifest by specifying its name and value
        Parameters:
        name - the attribute's name
        value - the Attribute's value
    • Method Detail

      • iterator

        public java.util.Iterator<java.lang.String> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.String>
      • equals

        public boolean equals​(java.lang.Object rhs)
        Overrides:
        equals in class Manifest.BaseAttribute
        See Also:
        Object.equals(java.lang.Object)
      • setName

        public void setName​(java.lang.String name)
        Set the Attribute's name; required
        Parameters:
        name - the attribute's name
      • getKey

        public java.lang.String getKey()
        Get the attribute's Key - its name in lower case.
        Returns:
        the attribute's key.
      • setValue

        public void setValue​(java.lang.String value)
        Set the Attribute's value; required
        Parameters:
        value - the attribute's value
      • getValue

        public java.lang.String getValue()
        Get the Attribute's value.
        Returns:
        the attribute's value.
      • addValue

        public void addValue​(java.lang.String value)
        Add a new value to this attribute - making it multivalued.
        Parameters:
        value - the attribute's additional value