Class Conversion.Sym

  • Enclosing class:
    Conversion

    public static class Conversion.Sym
    extends Conversion
    Simply represents the variable of the source unit so that convert(double) just returns the value passed in.
    • Constructor Detail

      • Sym

        public Sym​(char sym)
      • Sym

        public Sym​(java.lang.String sym)
    • Method Detail

      • convert

        public java.math.BigDecimal convert​(double original)
        Description copied from class: Conversion
        Primary operator for Conversion instances.
        Specified by:
        convert in class Conversion
        Parameters:
        original - A unit value which is to be processed through the tree-like representation of this equation. Only Conversion.Sym objects will actually use the "original" value.
        Returns:
        a BigDecimal result from the calculation. If this value maps to Double.NEGATIVE_INFINITY or Double.POSITIVE_INFINITY, then a BigResult exception should be thrown before returning to clients.