Interface ModelEntityList<T extends ModelEntity>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Remove all entities in the list.
      T copy​(java.lang.String newTag, java.lang.String tag)
      Creates a copy of an entity and inserts it in this list.
      T copy​(java.lang.String newTag, java.lang.String tag, java.lang.String model)
      Creates a copy of an entity, inserts it in this list and assigns it to the given model node.
      T copyTo​(java.lang.String newTag, java.lang.String tag, java.lang.String insertAfter)
      Creates a copy of an entity and inserts it to this list at a specified position.
      T duplicate​(java.lang.String newTag, java.lang.String tag)
      Creates a new entity with tag newTag which is a duplicate of the entity tagged tag.
      T duplicateTo​(java.lang.String newTag, java.lang.String tag, java.lang.String insertAfter)
      Creates a new entity with tag newTag duplicating the entity tagged tag and inserts it in this list at a specified position.
      T get​(java.lang.String tag)
      Get an entity in the list with a given tag.
      int index​(java.lang.String tag)
      Returns the position in the list of the object with the given tag.
      void remove​(java.lang.String tag)
      Removes an entity.
      int size()
      Returns the number of entities.
      java.lang.String[] tags()
      Returns a string array with the tags of all entities.
      java.lang.String uniquetag​(java.lang.String tag)
      Returns a unique tag in the list context.
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • Method Detail

      • clear

        void clear()
        Remove all entities in the list.
      • copy

        T copy​(java.lang.String newTag,
               java.lang.String tag)
        Creates a copy of an entity and inserts it in this list. The tag of the entity to copy is given as a path of tags, 'tag1/tag2/tag3' etc.
        Parameters:
        newTag - The tag of the new entity.
        tag - Tag of the entity to copy.
        Returns:
        The copied model entity.
      • copy

        T copy​(java.lang.String newTag,
               java.lang.String tag,
               java.lang.String model)
        Creates a copy of an entity, inserts it in this list and assigns it to the given model node. The tag of the entity to copy is given as a path of tags, 'tag1/tag2/tag3' etc.
        Parameters:
        newTag - The tag of the new entity.
        tag - Tag of the entity to copy.
        model - Tag of the destination model node.
        Returns:
        The copied model entity.
      • copyTo

        T copyTo​(java.lang.String newTag,
                 java.lang.String tag,
                 java.lang.String insertAfter)
        Creates a copy of an entity and inserts it to this list at a specified position. The tag of the entity to copy is given as a path of tags, 'tag1/tag2/tag3' etc.
        Parameters:
        newTag - The tag of the new entity.
        tag - Tag of the entity to copy.
        insertAfter - The tag of the entity to insert the new entity after, or empty string to insert the new entity first in the list.
        Returns:
        The copied model entity.
      • duplicate

        T duplicate​(java.lang.String newTag,
                    java.lang.String tag)
        Creates a new entity with tag newTag which is a duplicate of the entity tagged tag.
        Parameters:
        newTag - Tag of the new entity.
        tag - Tag of entity to duplicate.
        Returns:
        The new entity.
      • duplicateTo

        T duplicateTo​(java.lang.String newTag,
                      java.lang.String tag,
                      java.lang.String insertAfter)
        Creates a new entity with tag newTag duplicating the entity tagged tag and inserts it in this list at a specified position.
        Parameters:
        newTag - Tag of the new entity.
        tag - Tag of the entity to duplicate.
        insertAfter - The tag of the entity to insert the new entity after, or empty string to insert the new entity first in the list.
        Returns:
        The duplicated model entity.
      • get

        T get​(java.lang.String tag)
        Get an entity in the list with a given tag.
        Parameters:
        tag - Tag of entity to access.
        Returns:
        The specified entity.
      • index

        int index​(java.lang.String tag)
        Returns the position in the list of the object with the given tag.
        Parameters:
        tag - Tag of entity to look up.
        Returns:
        The zero based index of the entity, or -1 if the entity does not exist.
      • remove

        void remove​(java.lang.String tag)
        Removes an entity.
        Parameters:
        tag - Tag of entity to remove.
      • size

        int size()
        Returns the number of entities.
        Returns:
        Number of entities.
      • tags

        java.lang.String[] tags()
        Returns a string array with the tags of all entities.
        Returns:
        Tag vector.
      • uniquetag

        java.lang.String uniquetag​(java.lang.String tag)
        Returns a unique tag in the list context.
        Parameters:
        tag - The base for the unique tag.
        Returns:
        A unique tag.