class Unit[U <: Unit[_]] extends Equals
A unit of measure.
Decomposition of this unit [Q] into SI base units according to the equation:
[Q] = ξ·10n·mα·kgβ·sγ·Aδ·Kε·molζ·cdη
The exponents are represented by a vector starting with index 0 for n
etc while ξ
becomes an own field scale
.
Two units are considered to be equal if their SI exponents and scale are the same, respectively. The name and symbol strings have no meaning regarding to equality.
For ξ==1
we have a (potentially derived) SI unit.
For ξ==1
and n==0
we have a coherent SI unit.
- Alphabetic
- By Inheritance
- Unit
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Unit(siExponents: Vector[Int], symbol: String, name: String = "", scale: Double = 1.0)
Constructs a unit of measure [Q] with [Q] = ξ·10n·mα·kgβ·sγ·Aδ·Kε·molζ·cdη.
Constructs a unit of measure [Q] with [Q] = ξ·10n·mα·kgβ·sγ·Aδ·Kε·molζ·cdη.
- siExponents
the vector of integer exponents according to [Q] starting with index 0 for
n
- symbol
this unit's symbol string (informal)
- name
this unit's name string (informal)
- scale
the ξ in [Q]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def *[V <: Unit[_], W <: Unit[_]](other: Unit[V])(implicit mul: Mul4[Unit[U], Unit[V], W]): W
- def /[V <: Unit[_], W <: Unit[_]](other: Unit[V])(implicit div: Div4[Unit[U], Unit[V], W]): W
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canEqual(other: Any): Boolean
- Definition Classes
- Unit → Equals
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
coherentExponents: Vector[Int]
Exponents of the associated coherent SI unit.
-
val
coherentScale: Double
ξ·10^n.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- Unit → Equals → AnyRef → Any
-
def
finalize(): scala.Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- Unit → AnyRef → Any
-
def
isCoherent: Boolean
- returns
Is this a coherent SI unit?
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isSi: Boolean
- returns
Is this a (potentially derived) SI unit?
- val name: String
-
def
named(n: String): Unit[U]
- returns
a new unit equal to this except for the name field which is set to
n
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): scala.Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): scala.Unit
- Definition Classes
- AnyRef
-
def
prefixed(p: Prefix): Unit[U]
- returns
a new unit with this scale and the other fields cumulative adjusted to the specified prefix
- val scale: Double
-
def
scaled(s: Double): Unit[U]
- returns
a new unit equal to this except for the scale field which is cumulative set to
s*this.scale
- val siExponents: Vector[Int]
- val symbol: String
-
def
symboled(s: String): Unit[U]
- returns
a new unit equal to this except for the symbol field which is set to
s
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toDebug: String
-
def
toString(): String
- Definition Classes
- Unit → AnyRef → Any
-
final
def
wait(): scala.Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): scala.Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): scala.Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )