Record Class LinkAnchorPlacement
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LinkAnchorPlacement
- Record Components:
fromSide- from side value used by the operationtoSide- to side value used by the operationfromIndex- zero-based index to usefromCount- count value to usetoIndex- zero-based index to usetoCount- count value to use
public record LinkAnchorPlacement(AnchorSide fromSide, AnchorSide toSide, int fromIndex, int fromCount, int toIndex, int toCount)
extends Record
Calculated placement of one link anchor and its label direction.
-
Constructor Summary
ConstructorsConstructorDescriptionLinkAnchorPlacement(AnchorSide fromSide, AnchorSide toSide, int fromIndex, int fromCount, int toIndex, int toCount) Creates an instance of aLinkAnchorPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefromCountrecord component.intReturns the value of thefromIndexrecord component.fromSide()Returns the value of thefromSiderecord component.final inthashCode()Returns a hash code value for this object.inttoCount()Returns the value of thetoCountrecord component.inttoIndex()Returns the value of thetoIndexrecord component.toSide()Returns the value of thetoSiderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LinkAnchorPlacement
public LinkAnchorPlacement(AnchorSide fromSide, AnchorSide toSide, int fromIndex, int fromCount, int toIndex, int toCount) Creates an instance of aLinkAnchorPlacementrecord class.- Parameters:
fromSide- the value for thefromSiderecord componenttoSide- the value for thetoSiderecord componentfromIndex- the value for thefromIndexrecord componentfromCount- the value for thefromCountrecord componenttoIndex- the value for thetoIndexrecord componenttoCount- the value for thetoCountrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fromSide
Returns the value of thefromSiderecord component.- Returns:
- the value of the
fromSiderecord component
-
toSide
Returns the value of thetoSiderecord component.- Returns:
- the value of the
toSiderecord component
-
fromIndex
public int fromIndex()Returns the value of thefromIndexrecord component.- Returns:
- the value of the
fromIndexrecord component
-
fromCount
public int fromCount()Returns the value of thefromCountrecord component.- Returns:
- the value of the
fromCountrecord component
-
toIndex
public int toIndex()Returns the value of thetoIndexrecord component.- Returns:
- the value of the
toIndexrecord component
-
toCount
public int toCount()Returns the value of thetoCountrecord component.- Returns:
- the value of the
toCountrecord component
-