jAER project on SourceForge

net.sf.jaer.util
Class EngineeringFormat

java.lang.Object
  extended by net.sf.jaer.util.EngineeringFormat

public class EngineeringFormat
extends java.lang.Object

Formats and parses engineering fmt, e.g. 3n 4u 8.2M

Author:
tobi

Field Summary
 boolean fillSignEnabled
           
 int precision
           
protected  char[] suffixes
           
 
Constructor Summary
EngineeringFormat()
          Creates a new instance of EngineeringFormat
 
Method Summary
 java.lang.String format(double x)
           
 java.lang.String format(float x)
           
 int getPrecision()
           
 double parseDouble(java.lang.String s)
           
 float parseFloat(java.lang.String s)
           
 void setPrecision(int p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

precision

public int precision

suffixes

protected char[] suffixes

fillSignEnabled

public boolean fillSignEnabled
Constructor Detail

EngineeringFormat

public EngineeringFormat()
Creates a new instance of EngineeringFormat

Method Detail

format

public java.lang.String format(double x)

format

public java.lang.String format(float x)

parseDouble

public double parseDouble(java.lang.String s)

parseFloat

public float parseFloat(java.lang.String s)

setPrecision

public void setPrecision(int p)

getPrecision

public int getPrecision()

jAER project on SourceForge