Module org.jhotdraw8.draw
Package org.jhotdraw8.draw.handle
Record Class AbstractConnectorHandle.ConnectorAndConnectedFigure
java.lang.Object
java.lang.Record
org.jhotdraw8.draw.handle.AbstractConnectorHandle.ConnectorAndConnectedFigure
- Record Components:
connector- a connectorconnectedFigure- the connected figure
- Enclosing class:
AbstractConnectorHandle
public static record AbstractConnectorHandle.ConnectorAndConnectedFigure(@NonNull Connector connector, @NonNull Figure connectedFigure)
extends Record
Record for a connector and its connected figure.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectorAndConnectedFigure(@NonNull Connector connector, @NonNull Figure connectedFigure) Creates an instance of aConnectorAndConnectedFigurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectedFigurerecord component.Returns the value of theconnectorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectorAndConnectedFigure
Creates an instance of aConnectorAndConnectedFigurerecord class.- Parameters:
connector- the value for theconnectorrecord componentconnectedFigure- the value for theconnectedFigurerecord 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). -
connector
Returns the value of theconnectorrecord component.- Returns:
- the value of the
connectorrecord component
-
connectedFigure
Returns the value of theconnectedFigurerecord component.- Returns:
- the value of the
connectedFigurerecord component
-