Interface NodeGroup

    • Method Detail

      • active

        ModelEntity active​(boolean flag)
        Makes the group members active or inactive. If inactivating, members which cannot be inactivated are ignored.
        Specified by:
        active in interface ModelEntity
        Parameters:
        flag - true: make active; false: make inactive.
        Returns:
        Model entity.
      • add

        NodeGroup add​(java.lang.String tag)
        Adds a model entity to the group.
        Parameters:
        tag - The tag of the entity to add.
        Returns:
        The node group.
      • add

        NodeGroup add​(java.lang.String type,
                      java.lang.String tag)
        Adds a model entity to the group.
        Parameters:
        type - The model entity type.
        tag - The tag of the entity to add.
        Returns:
        The node group.
      • create

        NodeGroup create​(java.lang.String tag)
        Create a node group.
        Parameters:
        tag - Group tag.
        Returns:
        Created node group.
      • feature

        NodeGroupList feature()
        Returns all the sub node groups.
        Returns:
        List of node groups.
      • feature

        NodeGroup feature​(java.lang.String tag)
        Returns sub-node group with correct tag.
        Parameters:
        tag - NodeGroup tag.
        Returns:
        NodeGroup.
      • get

        ModelEntity get​(int index)
        Returns the group member at the given position.
        Parameters:
        index - The position among the members.
        Returns:
        Group member at the given position.
      • getAfter

        ModelEntity getAfter()
        Returns the model entity which this group is placed after. If null is returned, the group is placed before the first model entity.
        Returns:
        A model entity or null.
      • members

        java.lang.String[] members()
        Returns the tags of the group members. If there are members of more than one type, the members of the same type as the first member are returned. Use members(String) to get the members of a specific type.
        Returns:
        Entity tags.
      • members

        java.lang.String[] members​(java.lang.String type)
        Returns the tags of the group members of the specified type.
        Parameters:
        type - The model entity type.
        Returns:
        Entity tags.
      • placeAfter

        NodeGroup placeAfter​(java.lang.String tag)
        Places the group after another entity.
        Parameters:
        tag - The tag of the entity to place the group after. To place the group before the first entity use null or an empty string as tag.
        Returns:
        The node group.
      • placeAfter

        NodeGroup placeAfter​(java.lang.String type,
                             java.lang.String tag)
        Places the group after another entity.
        Parameters:
        type - The model entity type.
        tag - The tag of the entity to place the group after. To place the group before the first entity use null or an empty string as tag.
        Returns:
        The node group.
      • remove

        NodeGroup remove​(java.lang.String tag,
                         boolean moveBefore)
        Removes a model entity from the group.
        Parameters:
        tag - The tag of the entity to remove.
        moveBefore - Whether to move the entity before or after the other members of the group.
        Returns:
        The node group.
      • remove

        NodeGroup remove​(java.lang.String type,
                         java.lang.String tag,
                         boolean moveBefore)
        Removes a model entity from the group.
        Parameters:
        type - The model entity type.
        tag - The tag of the entity to remove.
        moveBefore - Whether to move the entity before or after the other members of the group.
        Returns:
        The node group.
      • size

        int size()
        Returns the number of group members.
        Returns:
        Number of entities.