Package dk.gtz.graphedit.model
Record Class ModelLint
java.lang.Object
java.lang.Record
dk.gtz.graphedit.model.ModelLint
- Record Components:
modelKey- The key of the related model (seeIBufferContainer)lintIdentifier- Unique identifier for the type of lintseverity- The severity level of the linttitle- A very brief headline describing the lintmessage- A detailed message displayed to the userlintDescription- A general description of what this kind of lint representsaffectedElements- A list of which syntactic elements should be highlightedaffectedRegions- A list of regions in the graph that should be highlighted
public record ModelLint(String modelKey, String lintIdentifier, ModelLintSeverity severity, String title, String message, Optional<String> lintDescription, List<UUID> affectedElements, List<List<ModelPoint>> affectedRegions)
extends Record
Model object of a lint.
A Lint is a special kind of diagnostic annotation that can provide smart meta-insights about sections of a graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaffectedElementsrecord component.Returns the value of theaffectedRegionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelintDescriptionrecord component.Returns the value of thelintIdentifierrecord component.message()Returns the value of themessagerecord component.modelKey()Returns the value of themodelKeyrecord component.severity()Returns the value of theseverityrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelLint
public ModelLint(String modelKey, String lintIdentifier, ModelLintSeverity severity, String title, String message, Optional<String> lintDescription, List<UUID> affectedElements, List<List<ModelPoint>> affectedRegions) Creates an instance of aModelLintrecord class.- Parameters:
modelKey- the value for themodelKeyrecord componentlintIdentifier- the value for thelintIdentifierrecord componentseverity- the value for theseverityrecord componenttitle- the value for thetitlerecord componentmessage- the value for themessagerecord componentlintDescription- the value for thelintDescriptionrecord componentaffectedElements- the value for theaffectedElementsrecord componentaffectedRegions- the value for theaffectedRegionsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
modelKey
Returns the value of themodelKeyrecord component.- Returns:
- the value of the
modelKeyrecord component
-
lintIdentifier
Returns the value of thelintIdentifierrecord component.- Returns:
- the value of the
lintIdentifierrecord component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
lintDescription
Returns the value of thelintDescriptionrecord component.- Returns:
- the value of the
lintDescriptionrecord component
-
affectedElements
Returns the value of theaffectedElementsrecord component.- Returns:
- the value of the
affectedElementsrecord component
-
affectedRegions
Returns the value of theaffectedRegionsrecord component.- Returns:
- the value of the
affectedRegionsrecord component
-