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 used
classes - values for classes
fields - values for fields
comments - values for comments
links - 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 Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Checks whether empty is enabled or applies on the active canvas.
      Returns:
      true if empty is enabled or applies; otherwise false
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • panelType

      public PanelType panelType()
      Returns the value of the panelType record component.
      Returns:
      the value of the panelType record component
    • classes

      public List<CopiedClass> classes()
      Returns the value of the classes record component.
      Returns:
      the value of the classes record component
    • fields

      public List<CopiedField> fields()
      Returns the value of the fields record component.
      Returns:
      the value of the fields record component
    • comments

      public List<CopiedComment> comments()
      Returns the value of the comments record component.
      Returns:
      the value of the comments record component
    • links

      public List<CopiedLink> links()
      Returns the value of the links record component.
      Returns:
      the value of the links record component