com.jhlabs.map
Class Unit
java.lang.Object
com.jhlabs.map.Unit
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- DegreeUnit
public class Unit
- extends Object
- implements Serializable
- See Also:
- Serialized Form
ANGLE_UNIT
public static final int ANGLE_UNIT
- See Also:
- Constant Field Values
LENGTH_UNIT
public static final int LENGTH_UNIT
- See Also:
- Constant Field Values
AREA_UNIT
public static final int AREA_UNIT
- See Also:
- Constant Field Values
VOLUME_UNIT
public static final int VOLUME_UNIT
- See Also:
- Constant Field Values
name
public String name
plural
public String plural
abbreviation
public String abbreviation
value
public double value
format
public static NumberFormat format
Unit
public Unit(String name,
String plural,
String abbreviation,
double value)
toBase
public double toBase(double n)
fromBase
public double fromBase(double n)
parse
public double parse(String s)
throws NumberFormatException
- Throws:
NumberFormatException
format
public String format(double n)
format
public String format(double n,
boolean abbrev)
format
public String format(double x,
double y,
boolean abbrev)
format
public String format(double x,
double y)
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
Copyright © 2011. All Rights Reserved.