java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.io.NumberOutput

public final class NumberOutput extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    notFinite(double value)
    Helper method to verify whether given double value is finite (regular rational number} or not (NaN or Infinity).
    static boolean
    notFinite(float value)
    Helper method to verify whether given float value is finite (regular rational number} or not (NaN or Infinity).
    static int
    outputInt(int v, byte[] b, int off)
     
    static int
    outputInt(int v, char[] b, int off)
    Method for appending value of given int value into specified char[].
    static int
    outputLong(long v, byte[] b, int off)
     
    static int
    outputLong(long v, char[] b, int off)
    Method for appending value of given long value into specified char[].
    static String
    toString(double v)
     
    static String
    toString(double v, boolean useFastWriter)
     
    static String
    toString(float v)
     
    static String
    toString(float v, boolean useFastWriter)
     
    static String
    toString(int v)
     
    static String
    toString(long v)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NumberOutput

      public NumberOutput()
  • Method Details

    • outputInt

      public static int outputInt(int v, char[] b, int off)
      Method for appending value of given int value into specified char[].

      NOTE: caller must guarantee that the output buffer has enough room for String representation of the value.

      Parameters:
      v - Value to append to buffer
      b - Buffer to append value to: caller must guarantee there is enough room
      off - Offset within output buffer (b) to append number at
      Returns:
      Offset within buffer after outputting int
    • outputInt

      public static int outputInt(int v, byte[] b, int off)
    • outputLong

      public static int outputLong(long v, char[] b, int off)
      Method for appending value of given long value into specified char[].

      NOTE: caller must guarantee that the output buffer has enough room for String representation of the value.

      Parameters:
      v - Value to append to buffer
      b - Buffer to append value to: caller must guarantee there is enough room
      off - Offset within output buffer (b) to append number at
      Returns:
      Offset within buffer after outputting long
    • outputLong

      public static int outputLong(long v, byte[] b, int off)
    • toString

      public static String toString(int v)
    • toString

      public static String toString(long v)
    • toString

      public static String toString(double v)
      Parameters:
      v - double
      Returns:
      double as a string
    • toString

      public static String toString(double v, boolean useFastWriter)
      Parameters:
      v - double
      useFastWriter - whether to use Schubfach algorithm to write output (default false)
      Returns:
      double as a string
      Since:
      2.14
    • toString

      public static String toString(float v)
      Parameters:
      v - float
      Returns:
      float as a string
      Since:
      2.6
    • toString

      public static String toString(float v, boolean useFastWriter)
      Parameters:
      v - float
      useFastWriter - whether to use Schubfach algorithm to write output (default false)
      Returns:
      float as a string
      Since:
      2.14
    • notFinite

      public static boolean notFinite(double value)
      Helper method to verify whether given double value is finite (regular rational number} or not (NaN or Infinity).
      Parameters:
      value - double value to check
      Returns:
      True if number is NOT finite (is Infinity or NaN); false otherwise Since 2.10
    • notFinite

      public static boolean notFinite(float value)
      Helper method to verify whether given float value is finite (regular rational number} or not (NaN or Infinity).
      Parameters:
      value - float value to check
      Returns:
      True if number is NOT finite (is Infinity or NaN); false otherwise Since 2.10