Class AbstractShape2i<T extends AbstractShape2i<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.i.AbstractShape2i<T>
-
- Type Parameters:
T
- the type of the shape.
- All Implemented Interfaces:
Serializable
,Cloneable
,Shape2ai<Shape2i<?>,T,PathElement2i,Point2i,Vector2i,Rectangle2i>
,Shape2i<T>
,Shape2D<Shape2i<?>,T,PathIterator2ai<PathElement2i>,Point2i,Vector2i,Rectangle2i>
,JsonableObject
- Direct Known Subclasses:
AbstractRectangularShape2i
,Circle2i
,MultiShape2i
,Path2i
,Rectangle2i
,Segment2i
,SegmentPoint2i
public abstract class AbstractShape2i<T extends AbstractShape2i<?>> extends Object implements Shape2i<T>
Abstract shape with 2 integer numbers.- Since:
- 13.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 AbstractShape2i()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Add listener on geometry changes.T
clone()
Clone this shape.boolean
equals(Object obj)
protected void
fireGeometryChange()
Notify any listener of a geometry change.GeomFactory2i
getGeomFactory()
Replies the geometry factory associated to this point.abstract int
hashCode()
protected void
removeShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Remove listener on geometry changes.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.d2.ai.Shape2ai
contains, contains, contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getPointIterator, intersects, intersects, intersects, intersects, intersects, intersects, intersects, toBoundingBox, translate, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
clear, equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, isEmpty, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set, toBoundingBox
-
-
-
-
Method Detail
-
addShapeGeometryChangeListener
protected void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Add listener on geometry changes.- Parameters:
listener
- the listener.
-
removeShapeGeometryChangeListener
protected void removeShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Remove listener on geometry changes.- Parameters:
listener
- the listener.
-
fireGeometryChange
protected void fireGeometryChange()
Notify any listener of a geometry change.
-
clone
public T clone()
Description copied from interface:Shape2D
Clone this shape.- Specified by:
clone
in interfaceShape2D<Shape2i<?>,T extends AbstractShape2i<?>,PathIterator2ai<PathElement2i>,Point2i,Vector2i,Rectangle2i>
- Overrides:
clone
in classObject
- Returns:
- the clone.
-
getGeomFactory
public final GeomFactory2i getGeomFactory()
Description copied from interface:Shape2D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceShape2ai<Shape2i<?>,T extends AbstractShape2i<?>,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Specified by:
getGeomFactory
in interfaceShape2D<Shape2i<?>,T extends AbstractShape2i<?>,PathIterator2ai<PathElement2i>,Point2i,Vector2i,Rectangle2i>
- 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.
-
-