public class TLcdAISPolyline extends java.lang.Object implements ILcd3DEditablePolyline, ILcdCache
It is required that all instances used as a delegate implement ILcdCache
.
Constructor and Description |
---|
TLcdAISPolyline()
The default constructor does not set the polyline to delegate to.
|
TLcdAISPolyline(ILcd3DEditablePolyline aPolyline)
Constructs a polyline that delegates to
aPolyline |
TLcdAISPolyline(TLcdAISPolyline aAISPolyline)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
java.lang.Object |
clone()
Makes
Object.clone() public. |
boolean |
contains2D(double v,
double v1)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double v,
double v1,
double v2)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
boolean |
equals(java.lang.Object aObject) |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
java.lang.Object |
getCachedObject(java.lang.Object o)
Looks up and returns the cached Object corresponding to the given key.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
ILcdPoint |
getPoint(int i)
Returns the
ILcdPoint at a given index. |
int |
getPointCount()
Returns the number of
ILcdPoint objects in the list. |
int |
hashCode() |
void |
insert2DPoint(int i,
double v,
double v1)
Inserts a point at the given index into this
ILcd2DEditablePointList . |
void |
insert3DPoint(int i,
double v,
double v1,
double v2)
Inserts a point at the given index into this
ILcd3DEditablePointList . |
void |
insertIntoCache(java.lang.Object o,
java.lang.Object o1)
Inserts a cache Object corresponding to the given key Object.
|
void |
move2D(double v,
double v1)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint aPoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2DPoint(int i,
double v,
double v1)
Moves the specified point of this
ILcd2DEditablePointList to the given point in the 2D space. |
void |
move3D(double v,
double v1,
double v2)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3D(ILcdPoint aPoint)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3DPoint(int i,
double v,
double v1,
double v2)
Moves the specified point of this
ILcd3DEditablePointList to the given point in the 3D space. |
java.lang.Object |
removeCachedObject(java.lang.Object o)
Looks up and removes the cached Object corresponding to the given key.
|
void |
removePointAt(int i)
Removes the point at the given index from this
ILcd2DEditablePointList . |
void |
set3DEditablePolyline(ILcd3DEditablePolyline aDelegatePolyline)
Sets the delegate polyline.
|
void |
translate2D(double v,
double v1)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate2DPoint(int i,
double v,
double v1)
Translates the specified point of this
ILcd2DEditablePointList from its current position
over the given translation vector in the 2D space. |
void |
translate3D(double v,
double v1,
double v2)
Translates this
ILcd3DEditableShape from its current position over the given translation
vector in the 3D space. |
void |
translate3DPoint(int i,
double v,
double v1,
double v2)
Translates the specified point of this
ILcd3DEditablePointList from its current position
over the given translation vector in the 3D space. |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
append2DPoint
getPointSFCT, getX, getY, getZ
public TLcdAISPolyline()
public TLcdAISPolyline(ILcd3DEditablePolyline aPolyline)
aPolyline
public TLcdAISPolyline(TLcdAISPolyline aAISPolyline)
aAISPolyline
.aAISPolyline
- public void set3DEditablePolyline(ILcd3DEditablePolyline aDelegatePolyline)
aDelegatePolyline
- must be an instance of ILcdCache
public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double v, double v1)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
v
- the x coordinate of the point.v1
- the y coordinate of the point.public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double v, double v1, double v2)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public int getPointCount()
ILcdPointList
ILcdPoint
objects in the list.getPointCount
in interface ILcdPointList
ILcdPoint
objects in the list.public ILcdPoint getPoint(int i) throws java.lang.IndexOutOfBoundsException
ILcdPointList
ILcdPoint
at a given index.getPoint
in interface ILcdPointList
i
- a valid index in the list of ILcdPoint
objects.ILcdPoint
at the given index.java.lang.IndexOutOfBoundsException
- if the given index is out of bounds.public void move2D(ILcdPoint aPoint)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aPoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void move2D(double v, double v1)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
v
- the x coordinate of the point.v1
- the y coordinate of the point.public void translate2D(double v, double v1)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditablePointList
translate2D
in interface ILcd2DEditableShape
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.public void move2DPoint(int i, double v, double v1)
ILcd2DEditablePointList
ILcd2DEditablePointList
to the given point in the 2D space. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2DPoint
in interface ILcd2DEditablePointList
i
- a valid index in the list of points.v
- the x coordinate of the point.v1
- the y coordinate of the point.public void translate2DPoint(int i, double v, double v1)
ILcd2DEditablePointList
ILcd2DEditablePointList
from its current position
over the given translation vector in the 2D space. Only the first two
dimensions of the points are considered. The third dimension is left unchanged.translate2DPoint
in interface ILcd2DEditablePointList
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.public void insert2DPoint(int i, double v, double v1)
ILcd2DEditablePointList
ILcd2DEditablePointList
.insert2DPoint
in interface ILcd2DEditablePointList
i
- a valid new index in the list of points.v
- the x coordinate of the new point.v1
- the y coordinate of the new point.public void removePointAt(int i)
ILcd2DEditablePointList
ILcd2DEditablePointList
.removePointAt
in interface ILcd2DEditablePointList
removePointAt
in interface ILcd3DEditablePointList
i
- a valid index in the list of ILcdPoint
objects.public void move3D(ILcdPoint aPoint)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aPoint
- the ILcdPoint
to move to.ILcd3DEditableShape.move3D(double, double, double)
public void move3D(double v, double v1, double v2)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.public void translate3D(double v, double v1, double v2)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditablePointList
translate3D
in interface ILcd3DEditableShape
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.v2
- the z coordinate of the translation vector.public void move3DPoint(int i, double v, double v1, double v2)
ILcd3DEditablePointList
ILcd3DEditablePointList
to the given point in the 3D space.move3DPoint
in interface ILcd3DEditablePointList
i
- a valid index in the list of points.v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.public void translate3DPoint(int i, double v, double v1, double v2)
ILcd3DEditablePointList
ILcd3DEditablePointList
from its current position
over the given translation vector in the 3D space.translate3DPoint
in interface ILcd3DEditablePointList
i
- a valid new index in the list of points.v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.v2
- the z coordinate of the translation vector.public void insert3DPoint(int i, double v, double v1, double v2)
ILcd3DEditablePointList
ILcd3DEditablePointList
.insert3DPoint
in interface ILcd3DEditablePointList
i
- a valid new index in the list of points.v
- the x coordinate of the new point.v1
- the y coordinate of the new point.v2
- the z coordinate of the new point.public void insertIntoCache(java.lang.Object o, java.lang.Object o1)
ILcdCache
insertIntoCache
in interface ILcdCache
o
- the key Object that will be used to identify the Object.
The key must therefore be a unique identifier, typically the caller
itself: insertIntoCache(this, ...)
.o1
- the Object to be cached.public java.lang.Object getCachedObject(java.lang.Object o)
ILcdCache
getCachedObject
in interface ILcdCache
o
- the key Object that was used for storing the cache Object.public java.lang.Object removeCachedObject(java.lang.Object o)
ILcdCache
removeCachedObject
in interface ILcdCache
o
- the key Object that was used for storing the cache Object.public void clearCache()
ILcdCache
clearCache
in interface ILcdCache
public java.lang.Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class java.lang.Object
Object.clone()
public boolean equals(java.lang.Object aObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object