public abstract class Unit extends Quantity
Modifier and Type | Field and Description |
---|---|
static Unit |
cm |
static NamedUnit |
date |
static Unit |
degree |
static BaseUnit |
duration |
static BaseUnit |
Empty |
static Unit |
gradian |
static BaseUnit |
gram |
static Unit |
hour |
static Unit |
in |
static BaseUnit |
meter |
static Unit |
minute |
static Unit |
mm |
static NamedUnit |
month |
static double |
NON_COMBINABLE
A magic factor to indicate units that have the same "dimension"
but not a fixed multiple.
|
static Unit |
pica |
static Unit |
pt |
static Unit |
radian |
static NamedUnit |
second |
Modifier and Type | Method and Description |
---|---|
static Unit |
define(java.lang.String name,
double factor,
Unit base) |
static Unit |
define(java.lang.String name,
DQuantity value) |
Dimensions |
dimensions() |
static Unit |
divide(Unit unit1,
Unit unit2) |
double |
doubleValue()
The value of the real component, as a double.
|
java.lang.String |
getName() |
int |
hashCode() |
boolean |
isExact() |
boolean |
isZero() |
static NamedUnit |
lookup(java.lang.String name) |
static NamedUnit |
make(java.lang.String name,
Quantity value) |
Complex |
number() |
static Unit |
pow(Unit unit,
int power) |
Numeric |
power(IntNum y)
Return this raised to an integer power.
|
Unit |
sqrt() |
static Unit |
times(Unit unit1,
Unit unit2) |
java.lang.String |
toString() |
java.lang.String |
toString(double val) |
java.lang.String |
toString(RealNum val) |
Unit |
unit() |
abs, add, add, addReversed, compare, compare, compareReversed, div, divide, divReversed, doubleImagValue, doubleJmagValue, doubleKmagValue, im, imValue, jm, jmValue, km, kmValue, make, make, make, mul, mulReversed, neg, re, reValue, times, toString
public static BaseUnit Empty
public static double NON_COMBINABLE
public static final BaseUnit meter
public static final BaseUnit duration
public static final BaseUnit gram
public static final Unit cm
public static final Unit mm
public static final Unit in
public static final Unit pt
public static final Unit pica
public static final Unit radian
public static final Unit degree
public static final Unit gradian
public static final NamedUnit date
public static final NamedUnit second
public static final NamedUnit month
public static final Unit minute
public static final Unit hour
public final Dimensions dimensions()
dimensions
in class Quantity
public final double doubleValue()
Quantity
doubleValue
in class Quantity
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getName()
public Numeric power(IntNum y)
Numeric
y < 0
, returns div_inv of the result.public Unit sqrt()
public static NamedUnit lookup(java.lang.String name)
public java.lang.String toString(double val)
public java.lang.String toString(RealNum val)