Record Class ClipboardSnapshot
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.ClipboardSnapshot
- Record Components:
panelType- diagram panel type whose model or layout should be usedclasses- values for classesfields- values for fieldscomments- values for commentslinks- values for links
public record ClipboardSnapshot(PanelType panelType, List<CopiedClass> classes, List<CopiedField> fields, List<CopiedComment> comments, List<CopiedLink> links)
extends Record
Serializable snapshot of copied classes, comments, links, fields, and layout data.
-
Constructor Summary
ConstructorsConstructorDescriptionClipboardSnapshot(PanelType panelType, List<CopiedClass> classes, List<CopiedField> fields, List<CopiedComment> comments, List<CopiedLink> links) Creates an instance of aClipboardSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclasses()Returns the value of theclassesrecord component.comments()Returns the value of thecommentsrecord component.final booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Checks whether empty is enabled or applies on the active canvas.links()Returns the value of thelinksrecord component.Returns the value of thepanelTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClipboardSnapshot
public ClipboardSnapshot(PanelType panelType, List<CopiedClass> classes, List<CopiedField> fields, List<CopiedComment> comments, List<CopiedLink> links) Creates an instance of aClipboardSnapshotrecord class.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Checks whether empty is enabled or applies on the active canvas.- Returns:
trueif empty is enabled or applies; otherwisefalse
-
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). -
panelType
Returns the value of thepanelTyperecord component.- Returns:
- the value of the
panelTyperecord component
-
classes
Returns the value of theclassesrecord component.- Returns:
- the value of the
classesrecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
comments
Returns the value of thecommentsrecord component.- Returns:
- the value of the
commentsrecord component
-
links
Returns the value of thelinksrecord component.- Returns:
- the value of the
linksrecord component
-