TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.core.internal
Class DCoord

java.lang.Object
  extended byorg.eclipse.tptp.platform.report.core.internal.DCoordAbstract
      extended byorg.eclipse.tptp.platform.report.core.internal.DCoord
All Implemented Interfaces:
IDCoord, IDItem, IDObject

public class DCoord
extends DCoordAbstract

A double coordinate on an axis, designed to be a child of a DPoint. As using double, all java number primitive types are covered (and can be stored here ). But this is the worst choice in term of memory consumming, especially if you have to store only a byte or integer ... In this case this is a good idea to create your own IDCoord implementation (might extending DCoordAbstract) to store only an integer.

See Also:
DPoint

Constructor Summary
DCoord()
          Create unusable unknown coordinate on an inexistent axis.
DCoord(DAxis a, double v)
          Create coordinate v on axis a
 
Method Summary
 double getValue()
           
 java.lang.Object getValue(java.lang.Object _p)
           
 void setValue(double _value)
          Change the value of the coordinate.
 void setValue(java.lang.Object _value)
          Change value in coordinate if parameter is an instance of java.lang.Number.
 
Methods inherited from class org.eclipse.tptp.platform.report.core.internal.DCoordAbstract
addChild, clear, getAppliedStyle, getAxis, getChildCount, getChildPosition, getFirstChild, getIterator, getLastChild, getNext, getParent, getRoot, getStyle, insertChild, isContainer, removeChild, setAxis, setNext, setParent, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DCoord

public DCoord(DAxis a,
              double v)
Create coordinate v on axis a

Parameters:
a - axis of the coordinate
v - value of coordinate

DCoord

public DCoord()
Create unusable unknown coordinate on an inexistent axis. Becarefull using this constructor, you mus provide axis/value calling setAxis(), setValue().

Method Detail

getValue

public double getValue()
Returns:
value of the coordinate.

getValue

public java.lang.Object getValue(java.lang.Object _p)
Returns:
current coordinate value using VFloat instance. If parameter is an instance of class VFloat, use this object rather than create a new VFloat instance.
See Also:
VFloat, getValue()

setValue

public void setValue(java.lang.Object _value)
Change value in coordinate if parameter is an instance of java.lang.Number. Otherwise do nothing.


setValue

public void setValue(double _value)
Change the value of the coordinate.

Parameters:
_value - new value of the coordinate.

TPTP 4.2.0 Platform Project
Internal API Specification