Class PropertyMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Property>, java.util.Collection<Property>, java.util.List<Property>, java.util.RandomAccess, org.w3c.dom.NamedNodeMap

    public class PropertyMap
    extends java.util.ArrayList<Property>
    implements org.w3c.dom.NamedNodeMap
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String COPYRIGHT  
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int pos, Property prop)
      Adds the prop object at the specified position if its type is Property otherwise nothing is added.
      boolean add​(Property prop)
      Adds the prop object if its type is Property otherwise nothing is added
      boolean addAll​(int pos, java.util.Collection<? extends Property> colection)
      Adds only the Property objects to this PropertyMap, starting from the specified position.
      boolean addAll​(java.util.Collection<? extends Property> arg0)
      Adds only the Property objects to this PropertyMap
      PropertyMap cloneMap​(Attribute owner)
      Clones the PropertyMap and all the Property objects in it.
      int getLength()  
      Property getNamedItem​(java.lang.String name)
      Looks up a Property using the specified qualified name.
      Property getNamedItemNS​(java.lang.String namespaceURI, java.lang.String localName)
      Looks up a Property using the specified namespace URI and localName.
      Property item​(int index)  
      Property removeNamedItem​(java.lang.String name)
      Removes the Property referenced by the given qualified name
      Property removeNamedItemNS​(java.lang.String namespaceURI, java.lang.String localName)
      Removes the Property referenced by the given namespace URI and localName
      Property setNamedItem​(org.w3c.dom.Node property)
      Adds a Property using its nodeName attribute.
      Property setNamedItemNS​(org.w3c.dom.Node property)
      Adds a node using its namespaceURI and localName.
      • Methods inherited from class java.util.ArrayList

        clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Method Detail

      • getLength

        public int getLength()
        Specified by:
        getLength in interface org.w3c.dom.NamedNodeMap
        Returns:
        the number of Properties in this PropertyMap
      • getNamedItem

        public Property getNamedItem​(java.lang.String name)
        Looks up a Property using the specified qualified name.
        Specified by:
        getNamedItem in interface org.w3c.dom.NamedNodeMap
        Returns:
        the Property that is a result of the search operation.
      • getNamedItemNS

        public Property getNamedItemNS​(java.lang.String namespaceURI,
                                       java.lang.String localName)
                                throws DOMException
        Looks up a Property using the specified namespace URI and localName.
        Specified by:
        getNamedItemNS in interface org.w3c.dom.NamedNodeMap
        Returns:
        the first Property found that match the specified criterias.
        Throws:
        DOMException
      • item

        public Property item​(int index)
        Specified by:
        item in interface org.w3c.dom.NamedNodeMap
        Returns:
        the property at the specified position
      • removeNamedItem

        public Property removeNamedItem​(java.lang.String name)
                                 throws DOMException
        Removes the Property referenced by the given qualified name
        Specified by:
        removeNamedItem in interface org.w3c.dom.NamedNodeMap
        Returns:
        the removed Property, or null if a Property with that qualified name could not be found.
        Throws:
        DOMException
      • removeNamedItemNS

        public Property removeNamedItemNS​(java.lang.String namespaceURI,
                                          java.lang.String localName)
                                   throws DOMException
        Removes the Property referenced by the given namespace URI and localName
        Specified by:
        removeNamedItemNS in interface org.w3c.dom.NamedNodeMap
        Returns:
        the removed Property, or null if a Property with that namespace URI and localName could not be found.
        Throws:
        DOMException
      • setNamedItem

        public Property setNamedItem​(org.w3c.dom.Node property)
                              throws DOMException
        Adds a Property using its nodeName attribute. As the nodeName attribute is used to derive the name which the Property must be stored under.
        Specified by:
        setNamedItem in interface org.w3c.dom.NamedNodeMap
        Parameters:
        property - A node to store in a named node map.
        Returns:
        If the new Property replaces an existing property the replaced Property is returned, otherwise null is returned.
        Throws:
        DOMException
      • setNamedItemNS

        public Property setNamedItemNS​(org.w3c.dom.Node property)
                                throws DOMException
        Adds a node using its namespaceURI and localName.
        Specified by:
        setNamedItemNS in interface org.w3c.dom.NamedNodeMap
        Parameters:
        property - A node to store in a named node map.
        Returns:
        If the new Property replaces an existing Property the replaced Property is returned, otherwise null is returned.
        Throws:
        DOMException
      • cloneMap

        public PropertyMap cloneMap​(Attribute owner)
        Clones the PropertyMap and all the Property objects in it. The new Property objects's parent references are pointed to the Attribute passed as an argument.
        Parameters:
        owner - - the Attribute object that will be set as the owner of the newly created Properties
        Returns:
        a deep clone of this PropertyMap object
      • add

        public void add​(int pos,
                        Property prop)
        Adds the prop object at the specified position if its type is Property otherwise nothing is added.
        Specified by:
        add in interface java.util.List<Property>
        Overrides:
        add in class java.util.ArrayList<Property>
      • add

        public boolean add​(Property prop)
        Adds the prop object if its type is Property otherwise nothing is added
        Specified by:
        add in interface java.util.Collection<Property>
        Specified by:
        add in interface java.util.List<Property>
        Overrides:
        add in class java.util.ArrayList<Property>
      • addAll

        public boolean addAll​(java.util.Collection<? extends Property> arg0)
        Adds only the Property objects to this PropertyMap
        Specified by:
        addAll in interface java.util.Collection<Property>
        Specified by:
        addAll in interface java.util.List<Property>
        Overrides:
        addAll in class java.util.ArrayList<Property>
      • addAll

        public boolean addAll​(int pos,
                              java.util.Collection<? extends Property> colection)
        Adds only the Property objects to this PropertyMap, starting from the specified position.
        Specified by:
        addAll in interface java.util.List<Property>
        Overrides:
        addAll in class java.util.ArrayList<Property>