org.shapelogic.polygon
Class CPointDouble
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
org.shapelogic.polygon.CPointDouble
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<IPoint2D>, GeometricShape2D, IPoint2D, PointReplacable<IPoint2D>
public class CPointDouble
- extends java.awt.geom.Point2D.Double
- implements IPoint2D
Simple point that is comparable and has arithmetic operations.
Sub classed from Java2D Point2D.Double
- Author:
- Sami Badawi
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation |
Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
CPointDouble
public CPointDouble(java.awt.geom.Point2D point)
CPointDouble
public CPointDouble(double x,
double y)
CPointDouble
public CPointDouble()
compareTo
public int compareTo(IPoint2D that)
- Specified by:
compareTo
in interface java.lang.Comparable<IPoint2D>
minus
public IPoint2D minus(IPoint2D that)
- Specified by:
minus
in interface IPoint2D
add
public IPoint2D add(IPoint2D that)
- Specified by:
add
in interface IPoint2D
multiply
public IPoint2D multiply(double multiplier)
- Specified by:
multiply
in interface IPoint2D
isNull
public boolean isNull()
- Specified by:
isNull
in interface IPoint2D
toDoubleArray
public double[] toDoubleArray()
- Specified by:
toDoubleArray
in interface IPoint2D
max
public IPoint2D max(IPoint2D that)
- Specified by:
max
in interface IPoint2D
min
public IPoint2D min(IPoint2D that)
- Specified by:
min
in interface IPoint2D
distance
public double distance(IPoint2D that)
- Specified by:
distance
in interface IPoint2D
round
public IPoint2D round()
- Specified by:
round
in interface IPoint2D
copy
public IPoint2D copy()
- Specified by:
copy
in interface IPoint2D
toString
public java.lang.String toString()
- Overrides:
toString
in class java.awt.geom.Point2D.Double
angle
public double angle()
- Specified by:
angle
in interface IPoint2D
isOnAxis
public boolean isOnAxis()
- Specified by:
isOnAxis
in interface IPoint2D
isOnDiagonal
public boolean isOnDiagonal()
- Specified by:
isOnDiagonal
in interface IPoint2D
distanceFromOrigin
public double distanceFromOrigin()
- Specified by:
distanceFromOrigin
in interface IPoint2D
turn90
public IPoint2D turn90()
- Specified by:
turn90
in interface IPoint2D
getCenter
public IPoint2D getCenter()
- Specified by:
getCenter
in interface GeometricShape2D
getDiameter
public double getDiameter()
- Specified by:
getDiameter
in interface GeometricShape2D
replacePointsInMap
public IPoint2D replacePointsInMap(java.util.Map<IPoint2D,IPoint2D> pointReplacementMap,
AnnotatedShapeImplementation annotatedShape)
- Specified by:
replacePointsInMap
in interface PointReplacable<IPoint2D>
Copyright © 2008. All Rights Reserved.