Record Class TransferableNodeList
java.lang.Object
java.lang.Record
com.marginallyclever.ro3.apps.nodetreeview.TransferableNodeList
- Record Components:
list
- the list of nodes to transfer
- All Implemented Interfaces:
Transferable
A
Transferable
that contains a list of Node
s.-
Field Summary
-
Constructor Summary
ConstructorDescriptionTransferableNodeList
(List<Node> list) Creates an instance of aTransferableNodeList
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@NotNull Object
getTransferData
(DataFlavor flavor) final int
hashCode()
Returns a hash code value for this object.boolean
isDataFlavorSupported
(DataFlavor flavor) list()
Returns the value of thelist
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
flavor
-
-
Constructor Details
-
TransferableNodeList
Creates an instance of aTransferableNodeList
record class.- Parameters:
list
- the value for thelist
record component
-
-
Method Details
-
getTransferDataFlavors
- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupported
in interfaceTransferable
-
getTransferData
@NotNull public @NotNull Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException - Specified by:
getTransferData
in interfaceTransferable
- Throws:
UnsupportedFlavorException
-
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)
. -
list
Returns the value of thelist
record component.- Returns:
- the value of the
list
record component
-