|
Purple Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.purpletech.graph.IntegerUnit
An IntegerUnit maps an int to a string representation. It also provides a natural interval (UnitInterval).
| Field Summary | |
protected java.lang.Object |
type
|
| Constructor Summary | |
IntegerUnit()
|
|
| Method Summary | |
protected void |
checkType(java.lang.Object val)
|
int |
fromObject(java.lang.Object val)
converts from an Object representing an actual value in the real units to an int. |
int |
fromString(java.lang.String val)
converts from a String representing an actual value in the real units to an int. |
UnitInterval |
getUnitInterval()
|
java.lang.String |
toString(int val)
converts from int to a String representation of this unit |
java.lang.String |
toString(java.lang.Object val)
converts from some Object type to a String representation of this unit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Object type
| Constructor Detail |
public IntegerUnit()
| Method Detail |
public java.lang.String toString(int val)
toString in interface Unitpublic java.lang.String toString(java.lang.Object val)
toString in interface Unitval - an object containing the value, usually a number wrapperpublic int fromString(java.lang.String val)
fromString in interface Unitval - a String representing an actual value in the real units
public int fromObject(java.lang.Object val)
fromObject in interface Unitval - a String representing an actual value in the real units
public UnitInterval getUnitInterval()
getUnitInterval in interface Unitprotected void checkType(java.lang.Object val)
|
Documentation generated March 5 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||