Package jade.content

Class ContentElementList

    • Constructor Detail

      • ContentElementList

        public ContentElementList()
        Construct a ContentElementList object
    • Method Detail

      • add

        public void add​(ContentElement element)
        Adds a new element (that must be a content element) to this content element list.
        Parameters:
        element - The element to add.
      • size

        public int size()
        Retrieves the number of elements in this content element list.
        Returns:
        The number of elements.
      • get

        public ContentElement get​(int i)
        Retrieves the i-th element in this content element list.
        Parameters:
        i - The index of the element to retrieve.
        Returns:
        The element.
      • iterator

        public Iterator iterator()
        Returns:
        An Iterator over the elements of this content element list.
      • clear

        public void clear()
        Clear all the elements in this content element list.
      • contains

        public boolean contains​(ContentElement element)
        Test if a given content element is contained in this content element list.
        Returns:
        true if the given content element is contained in this content element list.
      • indexOf

        public int indexOf​(ContentElement element)
        Returns the position of an element within this content element list.
        Returns:
        The position of an element within this content element list or -1 if the given element is not contained in this content element list.
      • remove

        public ContentElement remove​(int index)
        Removes the element at the given position from this content element list.
        Returns:
        The removed element.
      • isEmpty

        public boolean isEmpty()
        Test if the content element list is empty.
        Returns:
        true if this content element list does not contain any element.
      • toArray

        public ContentElement[] toArray()
        Retrieve all elements in this content element list in the form of an array.
        Returns:
        An array containing all elements in this content element list.