Class NodeGroupCollection

    • Method Detail

      • getNode

        public Node getNode()
        The Node the collection belongs to.
      • indexOf

        public int indexOf​(Object o)
        Determines the index of a specific group in the collection.
        Specified by:
        indexOf in interface List<String>
        Overrides:
        indexOf in class AbstractList<String>
        Parameters:
        o - The group to find. The value can be null.
        Returns:
        The index of the group in the collection, or -1 if not found.
      • contains

        public boolean contains​(Object o)
        Determines whether a group name is in the collection.
        Specified by:
        contains in interface Collection<String>
        Specified by:
        contains in interface List<String>
        Overrides:
        contains in class AbstractCollection<String>
        Parameters:
        o - The group name to locate in the collection. The value can be null.
        Returns:
        true if [o] is found in the collection; otherwise, false.
      • add

        public void add​(int index,
                        String item)
        Inserts an element into the collection at the specified index.
        Specified by:
        add in interface List<String>
        Overrides:
        add in class AbstractList<String>
        Parameters:
        index - The zero based index at which to add the element.
        item - The item to insert. Cannot be null.
        Throws:
        NullPointerException - Raised if [item] is null.
        IllegalArgumentException - index is less than 0.-or-index is equal to or greater than the collection count.
      • remove

        public boolean remove​(String item)
        Removes the group from the collection.
        Parameters:
        item - The group to be removed from the collection.
        Returns:
        true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the collection.
        Throws:
        NullPointerException - Raised if [item] is null.
      • remove

        public String remove​(int index)
        Removes an element from the collection at the specified index.
        Specified by:
        remove in interface List<String>
        Overrides:
        remove in class AbstractList<String>
        Parameters:
        index - The zero based index at which to remove the element.
        Throws:
        IllegalArgumentException - index is less than 0.-or-index is equal to or greater than the collection count.
      • get

        public String get​(int index)
        Gets the group at the specified index.
        Specified by:
        get in interface List<String>
        Specified by:
        get in class AbstractList<String>
        Parameters:
        index - The zero-based index of the group to find.
        Returns:
        A group name.
      • set

        public String set​(int index,
                          String value)
        Sets the group at the specified index.
        Specified by:
        set in interface List<String>
        Overrides:
        set in class AbstractList<String>
        Parameters:
        index - The zero-based index of the group to find.
        Returns:
        A group name.