Record Class Line
java.lang.Object
java.lang.Record
nl.colorize.multimedialib.math.Line
- All Implemented Interfaces:
Shape
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this shape contains the specified point.end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the smallest possible rectangular bounding box that can fit this shape.final inthashCode()Returns a hash code value for this object.reposition(Point2D offset) Returns a newShapeinstance that is repositioned by the specified offset.start()Returns the value of thestartrecord component.toString()Returns a string representation of this record class.Methods inherited from interface Shape
reposition
-
Constructor Details
-
Line
public Line(float startX, float startY, float endX, float endY) -
Line
-
-
Method Details
-
contains
-
getBoundingBox
Description copied from interface:ShapeReturns the smallest possible rectangular bounding box that can fit this shape.- Specified by:
getBoundingBoxin interfaceShape
-
getCenter
-
reposition
-
toString
-
hashCode
-
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). -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-