Documentation of 'jhplot.UConverter' Java class.
UConverter
jhplot

Class UConverter



  • public class UConverter
    extends java.lang.Object
    Class to convert various units of measure.
    • Constructor Summary

      Constructors 
      Constructor and Description
      UConverter()
      Initialise convertions
      UConverter(java.lang.String type)
      Initialise conversion if you know the type
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double convert(double value, java.lang.String fromUnit, java.lang.String toUnit)
      Perform convertion of values fomr one unit to another.
      com.edsdev.jconvert.domain.ConversionType findType(java.lang.String conversionUnit)
      Find and set conversion type.
      com.edsdev.jconvert.presentation.ConversionTypeData getConversionType()
      Get current convertion type.
      com.edsdev.jconvert.presentation.ConversionTypeData getConversionType(java.lang.String conversionType)
      Get convertion type
      java.util.List<com.edsdev.jconvert.domain.ConversionType> getDomanData()
      Get domain data
      java.lang.String[] getTypes()
      Get all conversion types as strings
      void setConversionType(java.lang.String conversionType)
      Set convertion type.
      java.lang.String toString()
      Show as a string all conversion types
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UConverter

        public UConverter()
        Initialise convertions
      • UConverter

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

      • convert

        public double convert(double value,
                              java.lang.String fromUnit,
                              java.lang.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 java.lang.String toString()
        Show as a string all conversion types
        Overrides:
        toString in class java.lang.Object
        Returns:
        string with all convertion types;
      • getTypes

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

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

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

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

        public java.util.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.

DMelt 3.0 © DataMelt by jWork.ORG