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 Converterconcatenate(Converter nextConverter)Return a converter which is equivalent to applying the `nextConverter` on the result of a conversion with this converter.Numberconvert(Number value)Return the result of an application of this converter on `value`.ProductConvertergetConverter()CalculationHelpergetHelper()InvertiblegetInversion()StringgetPrefixClass()longgetSignature()StringgetSymbol()voidsetHelper(CalculationHelper helper)voidsetPrefixClass(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:
getSignaturein interfaceSigned
-
concatenate
public Converter concatenate(Converter nextConverter)
Description copied from interface:ConverterReturn 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:
concatenatein interfaceConverter- Returns:
- a converter
-
convert
public Number convert(Number value)
Description copied from interface:ConverterReturn the result of an application of this converter on `value`.
-
getInversion
public Invertible getInversion()
- Specified by:
getInversionin interfaceInvertible
-
getConverter
public ProductConverter getConverter()
-
getPrefixClass
public String getPrefixClass()
-
setPrefixClass
public void setPrefixClass(String prefixClass)
-
-