Interface ItModelFactory
-
public interface ItModelFactory
This factory is responsible for instantiating model elements implementing theITModelElement
interface. The default methods provide a sane default implementation.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Issue.Comment
createComment(java.lang.String author, java.lang.String message, java.time.LocalDateTime dateTime, ITEngine engine)
Creates a newIssue.Comment
.default <T> java.util.List<T>
createCopy(java.util.List<T> list)
Creates a flat copy oflist
.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)
Creates a newIssue
.
-
-
-
Method Detail
-
createCopy
default <T> java.util.List<T> createCopy(java.util.List<T> list)
Creates a flat copy oflist
. Returns an empty list iflist
isnull
.null
values are filtered out.- Type Parameters:
T
- The type of the values oflist
.- 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 newIssue.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 isnull
.
-
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 newIssue
. List arguments are flat copied. If any of the given lists isnull
, 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
- Ifid
,author
,title
,dateTime
, orengine
isnull
.
-
-