Class NumberUtils


  • public class NumberUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      NumberUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void formatInt​(java.lang.StringBuilder sb, int value)
      Fast, but basic, integer to StringBuilder
      static void formatInt​(java.lang.StringBuilder sb, int value, int width)
      Place a fixed width representation of a non-negative int into the string buffer
      static void formatInt​(java.lang.StringBuilder sb, int value, int width, boolean signAlways)
      Format an integer, which may be signed
      static void formatSignedInt​(java.lang.StringBuilder sb, int value)
      Fast, but basic, integer to StringBuilder : always signed
      static void formatSignedInt​(java.lang.StringBuilder sb, int value, int width)
      Place a fixed width representation into the string buffer : always signed.
      static void formatUnsignedInt​(java.lang.StringBuilder sb, int value, int width)
      Place a fixed width representation into the string buffer : never signed.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NumberUtils

        public NumberUtils()
    • Method Detail

      • formatInt

        public static void formatInt​(java.lang.StringBuilder sb,
                                     int value)
        Fast, but basic, integer to StringBuilder
      • formatSignedInt

        public static void formatSignedInt​(java.lang.StringBuilder sb,
                                           int value)
        Fast, but basic, integer to StringBuilder : always signed
      • formatInt

        public static void formatInt​(java.lang.StringBuilder sb,
                                     int value,
                                     int width)
        Place a fixed width representation of a non-negative int into the string buffer
      • formatSignedInt

        public static void formatSignedInt​(java.lang.StringBuilder sb,
                                           int value,
                                           int width)
        Place a fixed width representation into the string buffer : always signed.
      • formatInt

        public static void formatInt​(java.lang.StringBuilder sb,
                                     int value,
                                     int width,
                                     boolean signAlways)
        Format an integer, which may be signed
      • formatUnsignedInt

        public static void formatUnsignedInt​(java.lang.StringBuilder sb,
                                             int value,
                                             int width)
        Place a fixed width representation into the string buffer : never signed.