Interface ItModelFactory


  • public interface ItModelFactory
    This factory is responsible for instantiating model elements implementing the ITModelElement interface. The default methods provide a sane default implementation.
    • Method Detail

      • createCopy

        default <T> java.util.List<T> createCopy​(java.util.List<T> list)
        Creates a flat copy of list. Returns an empty list if list is null. null values are filtered out.
        Type Parameters:
        T - The type of the values of list.
        Parameters:
        list - The list to copy.
        Returns:
        The copied list.
      • createComment

        default Issue.Comment createComment​(java.lang.String author,
                                            java.lang.String message,
                                            java.time.LocalDateTime dateTime,
                                            ITEngine engine)
                                     throws java.lang.NullPointerException
        Creates a new Issue.Comment.
        Parameters:
        author - The author of the comment to create.
        message - The message of the comment to create.
        dateTime - The datetime of the comment to create.
        engine - The engine of the comment to create.
        Returns:
        The created Issue.Comment instance.
        Throws:
        java.lang.NullPointerException - If any of the given arguments is null.
      • createIssue

        default Issue createIssue​(java.lang.String id,
                                  java.lang.String author,
                                  java.lang.String title,
                                  java.time.LocalDateTime dateTime,
                                  java.util.List<Issue.Comment> comments,
                                  ITEngine engine)
                           throws java.lang.NullPointerException
        Creates a new Issue. List arguments are flat copied. If any of the given lists is null, an empty list is used as fallback. null values are filtered out.
        Parameters:
        id - The id of the issue to create.
        author - The author of the issue to create.
        title - The title of the issue to create.
        dateTime - The datetime of the issue to create.
        comments - The commits of the issue to create.
        engine - The engine of the issue to create.
        Returns:
        The created Issue instance.
        Throws:
        java.lang.NullPointerException - If id, author, title, dateTime, or engine is null.