Example usage for javax.xml.bind DatatypeConverter printInteger

List of usage examples for javax.xml.bind DatatypeConverter printInteger

Introduction

In this page you can find the example usage for javax.xml.bind DatatypeConverter printInteger.

Prototype

public static String printInteger(java.math.BigInteger val) 

Source Link

Document

Converts a BigInteger value into a string.

Usage

From source file:org.openestate.io.daft_ie.DaftIeUtils.java

public static String printPositiveInteger(BigInteger value) {
    if (value == null || value.compareTo(BigInteger.ZERO) < 1)
        throw new IllegalArgumentException("Can't print positive integer value!");
    else/*from  ww  w. j a v a  2  s.  co  m*/
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.immobiliare_it.ImmobiliareItUtils.java

public static String printInteger(BigInteger value) {
    if (value == null)
        throw new IllegalArgumentException("Can't print integer value!");
    else/*from   w w w.  j  ava  2 s. c  om*/
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.is24_xml.Is24XmlUtils.java

public static String printZahl20(BigInteger value) {
    if (value == null || value.compareTo(BigInteger.ZERO) != 1)
        throw new IllegalArgumentException("Can't print integer value '" + value + "'!");
    String val = DatatypeConverter.printInteger(value);
    if (val.length() > 20)
        throw new IllegalArgumentException(
                "Can't print integer value '" + value + "'! The value exceeds maximal length of 20 digits.");
    return val;
}

From source file:org.openestate.io.kyero.KyeroUtils.java

public static String printInteger(BigInteger value) {
    if (value == null)
        throw new IllegalArgumentException("Can't print integer value '" + value + "'!");
    else//from w  ww  .  jav a2 s.com
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.kyero.KyeroUtils.java

public static String printNonNegativeInteger(BigInteger value) {
    if (value == null || value.compareTo(BigInteger.ZERO) == -1)
        throw new IllegalArgumentException("Can't print integer value '" + value + "'!");
    else/*w w w.j a v  a  2 s  . c o  m*/
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.trovit.TrovitUtils.java

public static String printInt(BigInteger value) {
    if (value == null)
        throw new IllegalArgumentException("Can't print integer value!");
    else// w w  w  .  ja v  a2  s.co m
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.trovit.TrovitUtils.java

public static String printIntBool(IntBool value) {
    Boolean boolValue = (value != null) ? value.getBoolValue() : null;
    BigInteger intValue = (value != null) ? value.getIntValue() : null;
    if (boolValue != null)
        return DatatypeConverter.printBoolean(boolValue);
    else if (intValue != null)
        return DatatypeConverter.printInteger(intValue);
    else/*from www  .  j ava  2s .c  o m*/
        throw new IllegalArgumentException("Can't print int-bool value!");
}

From source file:org.openestate.io.trovit.TrovitUtils.java

public static String printLong(BigInteger value) {
    if (value == null)
        throw new IllegalArgumentException("Can't print long value!");
    else//w ww.ja  va 2 s .c o m
        return DatatypeConverter.printInteger(value);
}

From source file:org.openestate.io.wis_it.WisItUtils.java

public static String printNonNegativeInteger(BigInteger value) {
    if (value == null || value.compareTo(BigInteger.ZERO) == -1)
        throw new IllegalArgumentException("Can't print integer value!");
    else/*from w  ww  .j  a v a2  s .  c o m*/
        return DatatypeConverter.printInteger(value);
}