Java BigInteger Calculate emit(BigInteger integer)

Here you can find the source of emit(BigInteger integer)

Description

Returns a string representation of the given integer.

License

Open Source License

Parameter

Parameter Description
integer The integer to convert to a string representation.

Return

The string representation of the given integer.

Declaration

public static String emit(BigInteger integer) 

Method Source Code

//package com.java2s;
/*// www . jav  a 2  s  .  c o m
 * The MIT License (MIT)
 *
 * Copyright (c) 2015 Lachlan Dowding
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

import java.math.BigInteger;

public class Main {
    /**
     * Returns a string representation of the given integer.
     *
     * @param integer The integer to convert to a string representation.
     * @return The string representation of the given integer.
     */
    public static String emit(BigInteger integer) {
        if (integer == null)
            return null;
        return integer.toString();
    }

    /**
     * Returns a string representation of the given list of integers.
     *
     * @param integers The list of integers to convert to string representations.
     * @return The string representations of the given list of integers.
     */
    public static String[] emit(BigInteger[] integers) {
        if (integers == null)
            return null;

        String[] strings = new String[integers.length];

        for (int i = 0; i < integers.length; i++) {
            strings[i] = emit(integers[i]);
        }

        return strings;
    }
}

Related

  1. divide(BigInteger dividend, BigInteger divisor)
  2. dump(BigInteger x)
  3. dumpBitLengthOfValues(BigInteger... data)
  4. dumpDataPathId(BigInteger datapathId)
  5. dumpNumber(PrintStream out, String s, BigInteger bi)
  6. encode(BigInteger number, String alphabets)
  7. encode_long(BigInteger big)
  8. encodeBigInt(OutputStream out, BigInteger x)
  9. encodeBigIntNoTypeCode(BigInteger value)