Package org.arakhne.afc.math.geometry.d1
Class ImmutablePoint1D<S extends Segment1D<?,?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d1.ImmutablePoint1D<S>
-
- Type Parameters:
S- the type of the segments.
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Point1D<?,?,?>>,Point1D<ImmutablePoint1D<S>,ImmutableVector1D<S>,S>,UnmodifiablePoint1D<ImmutablePoint1D<S>,ImmutableVector1D<S>,S>,Tuple2D<ImmutablePoint1D<S>>,UnmodifiableTuple2D<ImmutablePoint1D<S>>,JsonableObject
public final class ImmutablePoint1D<S extends Segment1D<?,?>> extends Object implements UnmodifiablePoint1D<ImmutablePoint1D<S>,ImmutableVector1D<S>,S>
Immutable point 1.5D.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description ImmutablePoint1D(S segment, double x, double y)Constructor.ImmutablePoint1D(S segment, int x, int y)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePoint1D<S>clone()Clone this point.booleanequals(Object object)Returns true if the Object t1 is of type Tuple2D and all of the data members of t1 are equal to the corresponding data members in this Tuple2D.ImmutableGeomFactory<S>getGeomFactory()Replies the geometry factory associated to this point.SgetSegment()Replies the segment.doublegetX()Get the x coordinate.doublegetY()Get the y coordinate.inthashCode()Returns a hash code value based on the data values in this object.intix()Get the x coordinate.intiy()Get the y coordinate.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.StringtoString()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.Point1D
$minus, $minus, $minus, $plus, $plus, compareTo, epsilonEquals, equals, getCurvilineCoordinate, getDistance, getDistanceCurviline, getDistanceL1, getDistanceLinf, getDistanceShift, getDistanceSquared, getLateralDistance, isOnSameSegment, isOnSegment, operator_add, operator_elvis, operator_equals, operator_minus, operator_minus, operator_minus, operator_notEquals, operator_plus, operator_plus, operator_remove, operator_upTo
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Tuple2D
epsilonEquals, equals, get, get, get
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.UnmodifiablePoint1D
add, clamp, set, set, set, setCurvilineCoordinate, setLateralDistance, setSegment, sub, toUnmodifiable
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.UnmodifiableTuple2D
absolute, absolute, add, add, addX, addX, addY, addY, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, interpolate, interpolate, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, sub, sub, subX, subX, subY, subY
-
-
-
-
Constructor Detail
-
ImmutablePoint1D
public ImmutablePoint1D(S segment, double x, double y)
Constructor.- Parameters:
segment- the segment.x- x coordinate.y- y coordinate.
-
ImmutablePoint1D
public ImmutablePoint1D(S segment, int x, int y)
Constructor.- Parameters:
segment- the segment.x- x coordinate.y- y coordinate.
-
-
Method Detail
-
getGeomFactory
public ImmutableGeomFactory<S> getGeomFactory()
Description copied from interface:Point1DReplies the geometry factory associated to this point.- Specified by:
getGeomFactoryin interfacePoint1D<ImmutablePoint1D<S extends Segment1D<?,?>>,ImmutableVector1D<S extends Segment1D<?,?>>,S extends Segment1D<?,?>>- Returns:
- the factory.
-
getSegment
public S getSegment()
Description copied from interface:Point1DReplies the segment.- Specified by:
getSegmentin interfacePoint1D<ImmutablePoint1D<S extends Segment1D<?,?>>,ImmutableVector1D<S extends Segment1D<?,?>>,S extends Segment1D<?,?>>- Returns:
- the segment or
nullif the weak reference has lost the segment.
-
equals
@Pure public boolean equals(Object object)
Description copied from interface:Tuple2DReturns true if the Object t1 is of type Tuple2D and all of the data members of t1 are equal to the corresponding data members in this Tuple2D.- Specified by:
equalsin interfacePoint1D<ImmutablePoint1D<S extends Segment1D<?,?>>,ImmutableVector1D<S extends Segment1D<?,?>>,S extends Segment1D<?,?>>- Specified by:
equalsin interfaceTuple2D<S extends Segment1D<?,?>>- Overrides:
equalsin classObject- Parameters:
object- the object with which the comparison is made- Returns:
- true or false
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple2DReturns a hash code value based on the data values in this object. Two differentTuple2Dobjects with identical data values (i.e.,Tuple2D.equals(Object)returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.- Specified by:
hashCodein interfacePoint1D<ImmutablePoint1D<S extends Segment1D<?,?>>,ImmutableVector1D<S extends Segment1D<?,?>>,S extends Segment1D<?,?>>- Specified by:
hashCodein interfaceTuple2D<S extends Segment1D<?,?>>- Overrides:
hashCodein classObject- Returns:
- the integer hash code value
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Parameters:
buffer- the Json buffer.
-
clone
@Pure public ImmutablePoint1D<S> clone()
Description copied from interface:Tuple2DClone this point.
-
getX
@Pure public double getX()
Description copied from interface:Tuple2DGet the x coordinate.
-
ix
@Pure public int ix()
Description copied from interface:Tuple2DGet the x coordinate.
-
getY
@Pure public double getY()
Description copied from interface:Tuple2DGet the y coordinate.
-
-