Example usage for java.math BigDecimal toString

List of usage examples for java.math BigDecimal toString

Introduction

In this page you can find the example usage for java.math BigDecimal toString.

Prototype

@Override
public String toString() 

Source Link

Document

Returns the string representation of this BigDecimal , using scientific notation if an exponent is needed.

Usage

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamMssCF.MSSBamMssCFBindNumberDefMinValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefMinValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*from  ww w  . j a  v a 2 s . c o m*/

    IMssCFAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal minValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalMinValue();
        if (minValue == null) {
            ret = null;
        } else {
            ret = minValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_11.MSSBamMssCF.MSSBamMssCFBindNumberDefMaxValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefMaxValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from  w  w  w. j av a2s .c  o m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal maxValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalMaxValue();
        if (maxValue == null) {
            ret = null;
        } else {
            ret = maxValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_11.MSSBamMssCF.MSSBamMssCFBindNumberDefMinValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefMinValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*  w  w w.  j  a va  2s  . com*/

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal minValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalMinValue();
        if (minValue == null) {
            ret = null;
        } else {
            ret = minValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamMssCF.MSSBamMssCFBindNumberDefInitValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefInitValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//w  w w .  j  a  v a2  s.co m

    IMssCFAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal initValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalInitValue();
        if (initValue == null) {
            ret = null;
        } else {
            ret = initValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamMssCF.MSSBamMssCFBindNumberDefNullValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefNullValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from   w ww  .j  a  v a 2  s .  c om

    IMssCFAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal nullValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalNullValue();
        if (nullValue == null) {
            ret = null;
        } else {
            ret = nullValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_11.MSSBamMssCF.MSSBamMssCFBindNumberDefInitValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefInitValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }// ww w.  j a v a  2 s.c  om

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal initValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalInitValue();
        if (initValue == null) {
            ret = null;
        } else {
            ret = initValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_11.MSSBamMssCF.MSSBamMssCFBindNumberDefNullValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefNullValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*from  w  ww  .  j  a v  a  2s.  c o m*/

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal nullValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalNullValue();
        if (nullValue == null) {
            ret = null;
        } else {
            ret = nullValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:org.kalypso.model.wspm.pdb.internal.wspm.ClassChecker.java

private String formatValues(final BigDecimal local, final BigDecimal remote) {
    final String localText = local == null ? STR_EMPTY : local.toString();
    final String remoteText = remote == null ? STR_EMPTY : remote.toString();

    return String.format(Messages.getString("ClassChecker_4"), localText, remoteText); //$NON-NLS-1$
}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamMssCF.MSSBamMssCFBindNumberDefDefaultValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefDefaultValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//ww  w  . j  a va 2  s  .  c o  m

    IMssCFAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal defaultValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalDefaultValue();
        if (defaultValue == null) {
            ret = null;
        } else {
            ret = defaultValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamMssCF.MSSBamMssCFBindNumberDefUnknownValue.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "MSSBamMssCFBindNumberDefUnknownValue.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*from w w w  .j ava  2s .co m*/

    IMssCFAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof IMSSBamBLNumberDefObj) {
        BigDecimal unknownValue = ((IMSSBamBLNumberDefObj) genDef).getOptionalUnknownValue();
        if (unknownValue == null) {
            ret = null;
        } else {
            ret = unknownValue.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "IMSSBamBLNumberDefObj");
    }

    return (ret);
}