de.grogra.util
Class Unit

java.lang.Object
  extended by de.grogra.util.Unit

public class Unit
extends java.lang.Object


Constructor Summary
Unit(java.lang.String name, double factor, boolean check)
           
 
Method Summary
 boolean checkWhenChoosing()
           
 double fromUnit(double uvalue)
           
 float getRatio(float value)
           
 boolean isSpecified(java.lang.String s)
           
 double parse(java.lang.String s)
           
 java.lang.String toString(double value)
           
 java.lang.String toString(float value)
           
 double toUnit(double qvalue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Unit

public Unit(java.lang.String name,
            double factor,
            boolean check)
Method Detail

checkWhenChoosing

public boolean checkWhenChoosing()

fromUnit

public double fromUnit(double uvalue)

getRatio

public float getRatio(float value)

isSpecified

public boolean isSpecified(java.lang.String s)

parse

public double parse(java.lang.String s)
             throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

toString

public java.lang.String toString(double value)

toString

public java.lang.String toString(float value)

toUnit

public double toUnit(double qvalue)