Skip to content

Commit

Permalink
docs(evaluated-model-reporter): Use imperative mood in function docs
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Jan 9, 2024
1 parent 88e0f29 commit e1c0651
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,9 @@ internal class EvaluatedModelMapper(private val input: ReporterInput) {
)

/**
* Adds the [value] to this list if the list does not already contain an equal item. Returns the item that is
* contained in the list. This is important to make sure that there is only one instance of equal items used in the
* model, because when Jackson generates IDs each instance gets a new ID, no matter if they are equal or not.
* Add the [value] to this list if the list does not already contain an equal item. Return the item contained in the
* list. This is important to make sure that there is only one instance of equal items used in the model, because
* when Jackson generates IDs each instance gets a new ID, no matter if they are equal or not.
*/
private fun <T> MutableList<T>.addIfRequired(value: T): T = find { it == value } ?: value.also { add(it) }

Expand Down

0 comments on commit e1c0651

Please sign in to comment.