Class Prefix
- java.lang.Object
-
- de.timmfitschen.easyunits.UniqueSignatureObject
-
- de.timmfitschen.easyunits.Named
-
- de.timmfitschen.easyunits.Symboled
-
- de.timmfitschen.easyunits.conversion.Prefix
-
- All Implemented Interfaces:
Converter
,Invertible
,Signed
public class Prefix extends Symboled implements Invertible
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Converter
concatenate(Converter nextConverter)
Return a converter which is equivalent to applying the `nextConverter` on the result of a conversion with this converter.Number
convert(Number value)
Return the result of an application of this converter on `value`.ProductConverter
getConverter()
CalculationHelper
getHelper()
Invertible
getInversion()
String
getPrefixClass()
long
getSignature()
String
getSymbol()
void
setHelper(CalculationHelper helper)
void
setPrefixClass(String prefixClass)
-
Methods inherited from class de.timmfitschen.easyunits.UniqueSignatureObject
equals
-
-
-
-
Constructor Detail
-
Prefix
public Prefix(String symbol, int base, int exponent)
-
-
Method Detail
-
getHelper
public CalculationHelper getHelper()
-
setHelper
public void setHelper(CalculationHelper helper)
-
getSignature
public long getSignature()
- Specified by:
getSignature
in interfaceSigned
-
concatenate
public Converter concatenate(Converter nextConverter)
Description copied from interface:Converter
Return a converter which is equivalent to applying the `nextConverter` on the result of a conversion with this converter. If `nextConverter` is null or the identity conversion, this converter is returned without instantiating a new converter. Otherwise, a new converter is instantiated while this converter is not altered.- Specified by:
concatenate
in interfaceConverter
- Returns:
- a converter
-
convert
public Number convert(Number value)
Description copied from interface:Converter
Return the result of an application of this converter on `value`.
-
getInversion
public Invertible getInversion()
- Specified by:
getInversion
in interfaceInvertible
-
getConverter
public ProductConverter getConverter()
-
getPrefixClass
public String getPrefixClass()
-
setPrefixClass
public void setPrefixClass(String prefixClass)
-
-