Java BigInteger to convertValueToZeroIfNullOrNegative(BigInteger value)

Here you can find the source of convertValueToZeroIfNullOrNegative(BigInteger value)

Description

convert Value To Zero If Null Or Negative

License

Open Source License

Declaration

public static BigInteger convertValueToZeroIfNullOrNegative(BigInteger value) 

Method Source Code

//package com.java2s;

import java.math.BigInteger;

public class Main {
    public static BigInteger convertValueToZeroIfNullOrNegative(BigInteger value) {
        if (value == null || value.compareTo(BigInteger.ZERO) < 0) {
            return BigInteger.ZERO;
        }/*w  w w .  j a  v  a  2  s.c om*/

        return value;
    }
}

Related

  1. convertRealNumberBits(BigInteger source, int size, int direction)
  2. convertRepresentation(BigInteger b)
  3. convertToBase62String(BigInteger value)
  4. convertToLong(BigInteger bigInteger)
  5. convertToString(BigInteger biSequence, int kmerSize)
  6. getUnsignedBigIntegerAsHex(BigInteger bi)
  7. getUnsignedBytes(BigInteger number, int length)
  8. stringForBig(BigInteger big, int sigchars)
  9. toBase_128(BigInteger val)