UConverter
jhplot

Class UConverter



  • public class UConverterextends Object
    Class to convert various units of measure.
    • Constructor Detail

      • UConverter

        public UConverter()
        Initialise convertions
      • UConverter

        public UConverter(String type)
        Initialise conversion if you know the type
        Parameters:
        type - unit type.
    • Method Detail

      • convert

        public double convert(double value,             String fromUnit,             String toUnit)
        Perform convertion of values fomr one unit to another.
        Parameters:
        value - value
        fromUnit - original unit
        toUnit - unit to convert
        Returns:
        value after convertion
      • toString

        public String toString()
        Show as a string all conversion types
        Overrides:
        toString in class Object
        Returns:
        string with all convertion types;
      • getTypes

        public String[] getTypes()
        Get all conversion types as strings
        Returns:
        array with conversion styles.
      • findType

        public com.edsdev.jconvert.domain.ConversionType findType(String conversionUnit)
        Find and set conversion type.
        Parameters:
        conversionUnit - convertion unit
        Returns:
        conversion type
      • getConversionType

        public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType(String conversionType)
        Get convertion type
        Parameters:
        conversionType -
        Returns:
      • setConversionType

        public void setConversionType(String conversionType)
        Set convertion type.
        Parameters:
        conversionType -
      • getDomanData

        public List<com.edsdev.jconvert.domain.ConversionType> getDomanData()
        Get domain data
        Returns:
      • getConversionType

        public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType()
        Get current convertion type.
        Returns:
        current conversion type.

SCaVis 2.2 © jWork.ORG