Record Class DoublePoint
java.lang.Object
java.lang.Record
com.ggalmazor.ltdownsampling.DoublePoint
- All Implemented Interfaces:
Point
-
Constructor Summary
ConstructorsConstructorDescriptionDoublePoint(double x, double y) Creates an instance of aDoublePointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static DoublePointUtility factory forDoublePointthat accepts abstractNumbervalues.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
DoublePoint
public DoublePoint(double x, double y) Creates an instance of aDoublePointrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
of
Utility factory forDoublePointthat accepts abstractNumbervalues.- Parameters:
x- the value of the point in the horizontal dimension (time)y- the value of the point in the vertical dimension- Returns:
- the new
DoublePointinstance
-
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 with thecomparemethod from their corresponding wrapper classes. -
x
-
y
-