Class XSPFCollection<E extends XSPFElement>

    • Constructor Detail

      • XSPFCollection

        public XSPFCollection​(Element container)
        Creates instance.
        Parameters:
        container - The common parent element of all the elements inside of this collection.
    • Method Detail

      • createNew

        public E createNew()
                    throws XSPFException
        Creates (but does not add to this collection yet) new element.
        Returns:
        Throws:
        XSPFException
      • create

        protected abstract E create​(Element child)
        Creates the XSPFElement for the given XML element.
        Parameters:
        child -
        Returns:
      • elemName

        protected abstract String elemName()
        Returns the element name of the children.
        Returns:
      • add

        public void add​(E element)
                 throws XSPFException
        Adds the given element to this collection.
        Parameters:
        element -
        Throws:
        XSPFException
      • remove

        public void remove​(E element)
                    throws XSPFException
        Removes the given element from this collection.
        Parameters:
        element -
        Throws:
        XSPFException
      • list

        public java.util.stream.Stream<E> list()
                                        throws XSPFException
        Returns the Stream containing all the elements inside of this collection.
        Returns:
        Throws:
        XSPFException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object