public class UConverter extends Object
Constructor and Description |
---|
UConverter()
Initialise convertions
|
UConverter(String type)
Initialise conversion if you know the type
|
Modifier and Type | Method and Description |
---|---|
double |
convert(double value,
String fromUnit,
String toUnit)
Perform convertion of values fomr one unit to another.
|
com.edsdev.jconvert.domain.ConversionType |
findType(String conversionUnit)
Find and set conversion type.
|
com.edsdev.jconvert.presentation.ConversionTypeData |
getConversionType()
Get current convertion type.
|
com.edsdev.jconvert.presentation.ConversionTypeData |
getConversionType(String conversionType)
Get convertion type
|
List<com.edsdev.jconvert.domain.ConversionType> |
getDomanData()
Get domain data
|
String[] |
getTypes()
Get all conversion types as strings
|
void |
setConversionType(String conversionType)
Set convertion type.
|
String |
toString()
Show as a string all conversion types
|
public UConverter()
public UConverter(String type)
type
- unit type.public double convert(double value, String fromUnit, String toUnit)
value
- valuefromUnit
- original unittoUnit
- unit to convertpublic String toString()
public String[] getTypes()
public com.edsdev.jconvert.domain.ConversionType findType(String conversionUnit)
conversionUnit
- convertion unitpublic com.edsdev.jconvert.presentation.ConversionTypeData getConversionType(String conversionType)
conversionType
- public void setConversionType(String conversionType)
conversionType
- public List<com.edsdev.jconvert.domain.ConversionType> getDomanData()
public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType()
SCaVis 1.0 ©