|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.util.unit.Unit
Base class for the measurment system in the print framework.
When adding a new measurement unit to the framework you must
extend this class and implement the getPoint().
| Constructor Summary | |
Unit()
Constructor: PFUnit |
|
Unit(double parUnits)
Constructor: PFUnit |
|
| Method Summary | |
Unit |
add(double parUnits)
Add a double value to this unit. |
Unit |
add(Unit parUnits)
Add another measurement system value to this unit. |
Object |
clone()
|
Unit |
divide(double parUnits)
Divide a double value to this unit. |
Unit |
divide(Unit parUnits)
Divide another measurement system value to this unit. |
boolean |
equals(Object parUnit)
|
abstract double |
getPoints()
This method is in charge of converting the unit value in the current measurement system to points. |
double |
getUnits()
Get the units in the implemented measurement system. |
Unit |
multiply(double parUnits)
Multiply a double value to this unit. |
Unit |
multiply(Unit parUnits)
Multiply another measurement system value to this unit. |
abstract void |
setPoints(double parPoints)
Set the value of this object in points a convert the value to the current measurment system define by the class. |
void |
setUnits(double parUnits)
Set the unit value, using the implemented unit of measurment. |
Unit |
substract(double parUnits)
Substract a double value to this unit. |
Unit |
substract(Unit parUnits)
Method: substract |
String |
toString()
|
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Unit()
public Unit(double parUnits)
parUnits - a value of type double| Method Detail |
public void setUnits(double parUnits)
parUnits - a value of type doublepublic double getUnits()
public abstract double getPoints()
public abstract void setPoints(double parPoints)
parPoints - a value of type doublepublic Unit add(Unit parUnits)
parUnits - a value of type PFUnitpublic Unit add(double parUnits)
double value to this unit. Note
that the value passed in parameters is assumed to be
in the current units defined by this object.
parUnits - a value of type Unitpublic Unit substract(Unit parUnits)
Substract another measurement system value to this unit.
parUnits - a value of type Unitpublic Unit substract(double parUnits)
double value to this unit. Note
that the value passed in parameters is assumed to be
in the current units defined by this object.
parUnits - a value of type Unit
public Unit multiply(Unit parUnits)
parUnits - a value of type Unitpublic Unit multiply(double parUnits)
double value to this unit. Note
that the value passed in parameters is assumed to be
in the current units defined by this object.
parUnits - a value of type doublepublic Unit divide(Unit parUnits)
null value will be returned.
parUnits - a value of type Unitpublic Unit divide(double parUnits)
double value to this unit. Note
that the value passed in parameters is assumed to be
in the current units defined by this object.
Note: A denominator with a zero value will be trapped
and a null value will be returned.
parUnits - a value of type doublepublic boolean equals(Object parUnit)
parUnit - a value of type Object
public Object clone()
public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||