Class AbstractShape1d<T extends AbstractShape1d<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d1.d.AbstractShape1d<T>
-
- Type Parameters:
T
- the type of the shape.
- All Implemented Interfaces:
Serializable
,Cloneable
,Shape1afp<Shape1d<?>,T,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
,Shape1d<T>
,Shape1D<Shape1d<?>,T,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
,JsonableObject
- Direct Known Subclasses:
AbstractRectangularShape1d
,Rectangle1d
public abstract class AbstractShape1d<T extends AbstractShape1d<?>> extends Object implements Shape1d<T>
Abstract shape with 2 double precision floating-point numbers.- 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 Modifier Constructor Description protected
AbstractShape1d()
Constructor.protected
AbstractShape1d(Segment1D<?,?> segment)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
clone()
Clone this shape.boolean
equals(Object obj)
GeomFactory1d
getGeomFactory()
Replies the geometry factory associated to this point.Segment1D<?,?>
getSegment()
Replies the segment.abstract int
hashCode()
void
setSegment(Segment1D<?,?> segment)
Set the segment.void
toJson(JsonBuffer buffer)
Replies the Json representation of this node.String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.afp.Shape1afp
contains, contains, contains, contains, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, intersects, intersects, toBoundingBox, translate, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.Shape1D
clear, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, isEmpty, operator_add, operator_and, operator_and, operator_minus, operator_plus, operator_remove, operator_upTo, set, toBoundingBox
-
-
-
-
Constructor Detail
-
AbstractShape1d
protected AbstractShape1d()
Constructor.
-
AbstractShape1d
protected AbstractShape1d(Segment1D<?,?> segment)
Constructor.- Parameters:
segment
- the segment.
-
-
Method Detail
-
getSegment
public Segment1D<?,?> getSegment()
Description copied from interface:Shape1D
Replies the segment.- Specified by:
getSegment
in interfaceShape1D<Shape1d<?>,T extends AbstractShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
- Returns:
- the segment or
null
if the weak reference has lost the segment.
-
setSegment
public void setSegment(Segment1D<?,?> segment)
Description copied from interface:Shape1D
Set the segment.- Specified by:
setSegment
in interfaceShape1D<Shape1d<?>,T extends AbstractShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
- Parameters:
segment
- is the segment.
-
getGeomFactory
public final GeomFactory1d getGeomFactory()
Description copied from interface:Shape1D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceShape1afp<Shape1d<?>,T extends AbstractShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
- Specified by:
getGeomFactory
in interfaceShape1D<Shape1d<?>,T extends AbstractShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
- Returns:
- the factory.
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObject
Replies the Json representation of this node.- Specified by:
toJson
in interfaceJsonableObject
- Parameters:
buffer
- the Json buffer.
-
-