public class Unit extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
String |
abbreviation |
static int |
ANGLE_UNIT |
static int |
AREA_UNIT |
static NumberFormat |
format |
static int |
LENGTH_UNIT |
String |
name |
String |
plural |
double |
value |
static int |
VOLUME_UNIT |
Constructor and Description |
---|
Unit(String name,
String plural,
String abbreviation,
double value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
format(double n) |
String |
format(double n,
boolean abbrev) |
String |
format(double x,
double y) |
String |
format(double x,
double y,
boolean abbrev) |
double |
fromBase(double n) |
int |
hashCode() |
double |
parse(String s) |
double |
toBase(double n) |
String |
toString() |
public static final int ANGLE_UNIT
public static final int LENGTH_UNIT
public static final int AREA_UNIT
public static final int VOLUME_UNIT
public String name
public String plural
public String abbreviation
public double value
public static final NumberFormat format
public double toBase(double n)
public double fromBase(double n)
public double parse(String s) throws NumberFormatException
NumberFormatException
public String format(double n)
public String format(double n, boolean abbrev)
public String format(double x, double y, boolean abbrev)
public String format(double x, double y)
Copyright © 2021. All rights reserved.