Record Class LinkCreationState
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LinkCreationState
- Record Components:
sourceType- type value to useclassId- id of the class to look up or modifyfieldId- id of the field to look up or modifycommentId- id of the comment to look up or modifylinkId- id of the link to look up or modify
public record LinkCreationState(SelectedElement.SelectedType sourceType, String classId, String fieldId, String commentId, String linkId)
extends Record
State kept while the user creates a new link with the mouse.
-
Constructor Summary
ConstructorsConstructorDescriptionLinkCreationState(SelectedElement.SelectedType sourceType, String classId, String fieldId, String commentId, String linkId) Creates an instance of aLinkCreationStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionclassId()Returns the value of theclassIdrecord component.Returns the value of thecommentIdrecord component.final booleanIndicates whether some other object is "equal to" this one.fieldId()Returns the value of thefieldIdrecord component.static LinkCreationStatefromSelection(SelectedElement selection) Creates a value from the supplied selection.final inthashCode()Returns a hash code value for this object.linkId()Returns the value of thelinkIdrecord component.Returns the value of thesourceTyperecord component.Converts the input to a selected element on the active canvas.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LinkCreationState
public LinkCreationState(SelectedElement.SelectedType sourceType, String classId, String fieldId, String commentId, String linkId) Creates an instance of aLinkCreationStaterecord class.- Parameters:
sourceType- the value for thesourceTyperecord componentclassId- the value for theclassIdrecord componentfieldId- the value for thefieldIdrecord componentcommentId- the value for thecommentIdrecord componentlinkId- the value for thelinkIdrecord component
-
-
Method Details
-
fromSelection
Creates a value from the supplied selection.- Parameters:
selection- selection state to read or update- Returns:
- the from selection result
-
toSelectedElement
Converts the input to a selected element on the active canvas.- Returns:
- the to selected element result
-
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). -
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
classId
Returns the value of theclassIdrecord component.- Returns:
- the value of the
classIdrecord component
-
fieldId
Returns the value of thefieldIdrecord component.- Returns:
- the value of the
fieldIdrecord component
-
commentId
Returns the value of thecommentIdrecord component.- Returns:
- the value of the
commentIdrecord component
-
linkId
Returns the value of thelinkIdrecord component.- Returns:
- the value of the
linkIdrecord component
-