gw.util.science.IUnit.gs Maven / Gradle / Ivy
package gw.util.science
interface IUnit,
U extends IUnit> extends IDimension {
property get UnitName() : String
property get UnitSymbol() : String
function toBaseUnits( theseUnits: B ) : B
function from( dim: D ) : B
property get FullName() : String {
return UnitName
}
property get FullSymbol() : String {
return UnitSymbol
}
// implements IPostfixBinder
function postfixBind( amount: Number ) : D {
return new D( amount, this )
}
override function fromNumber( n: B ) : U {
return null
}
override function numberType() : Class {
return B
}
override function compareTo( o: U ) : int {
return toNumber().compareTo( o.toNumber() )
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy