Class CharScanner

java.lang.Object
org.apache.groovy.json.internal.CharScanner

public class CharScanner
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected static int ALPHA_0  
    protected static int ALPHA_9  
    protected static int CLOSED_BRACKET  
    protected static int CLOSED_CURLY  
    protected static int COMMA  
    protected static int DECIMAL_POINT  
    protected static int LETTER_BIG_E  
    protected static int LETTER_E  
    protected static int MINUS  
    protected static int PLUS  
  • Constructor Summary

    Constructors
    Constructor Description
    CharScanner()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String debugCharDescription​(int c)  
    static java.lang.String errorDetails​(java.lang.String message, char[] array, int index, int ch)  
    static boolean hasDecimalChar​(char[] chars, boolean negative)  
    static boolean isDecimalChar​(int currentChar)  
    static boolean isDecimalDigit​(int c)  
    protected static boolean isDelimiter​(int c)  
    static boolean isDigit​(int c)  
    static boolean isInteger​(char[] digitChars)  
    static boolean isInteger​(char[] digitChars, int offset, int len)  
    static boolean isLong​(char[] digitChars)  
    static boolean isLong​(char[] digitChars, int offset, int len)  
    static boolean isNumberDigit​(int c)  
    static java.math.BigDecimal parseBigDecimal​(char[] buffer)  
    static double parseDouble​(char[] buffer, int from, int to)  
    static float parseFloat​(char[] buffer, int from, int to)  
    static int parseInt​(char[] digitChars)  
    static int parseIntFromTo​(char[] digitChars, int offset, int to)  
    static int parseIntFromToIgnoreDot​(char[] digitChars, int offset, int to)  
    static java.lang.Number parseJsonNumber​(char[] buffer)  
    static java.lang.Number parseJsonNumber​(char[] buffer, int from, int to)  
    static java.lang.Number parseJsonNumber​(char[] buffer, int from, int max, int[] size)  
    static long parseLong​(char[] digitChars)  
    static long parseLongFromTo​(char[] digitChars, int offset, int to)  
    static long parseLongFromToIgnoreDot​(char[] digitChars, int offset, int to)  
    static char[] readNumber​(char[] array, int idx, int len)  
    static int skipWhiteSpace​(char[] array, int index, int length)  

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • CharScanner

      public CharScanner()
  • Method Details

    • isDigit

      public static boolean isDigit​(int c)
    • isDecimalDigit

      public static boolean isDecimalDigit​(int c)
    • isDecimalChar

      public static boolean isDecimalChar​(int currentChar)
    • hasDecimalChar

      public static boolean hasDecimalChar​(char[] chars, boolean negative)
    • isLong

      public static boolean isLong​(char[] digitChars)
    • isLong

      public static boolean isLong​(char[] digitChars, int offset, int len)
    • isInteger

      public static boolean isInteger​(char[] digitChars)
    • isInteger

      public static boolean isInteger​(char[] digitChars, int offset, int len)
    • parseInt

      public static int parseInt​(char[] digitChars)
    • parseIntFromTo

      public static int parseIntFromTo​(char[] digitChars, int offset, int to)
    • parseIntFromToIgnoreDot

      public static int parseIntFromToIgnoreDot​(char[] digitChars, int offset, int to)
    • parseLongFromToIgnoreDot

      public static long parseLongFromToIgnoreDot​(char[] digitChars, int offset, int to)
    • parseLongFromTo

      public static long parseLongFromTo​(char[] digitChars, int offset, int to)
    • parseLong

      public static long parseLong​(char[] digitChars)
    • parseJsonNumber

      public static java.lang.Number parseJsonNumber​(char[] buffer)
    • parseJsonNumber

      public static java.lang.Number parseJsonNumber​(char[] buffer, int from, int to)
    • isNumberDigit

      public static boolean isNumberDigit​(int c)
    • isDelimiter

      protected static boolean isDelimiter​(int c)
    • parseJsonNumber

      public static java.lang.Number parseJsonNumber​(char[] buffer, int from, int max, int[] size)
    • parseBigDecimal

      public static java.math.BigDecimal parseBigDecimal​(char[] buffer)
    • parseFloat

      public static float parseFloat​(char[] buffer, int from, int to)
    • parseDouble

      public static double parseDouble​(char[] buffer, int from, int to)
    • skipWhiteSpace

      public static int skipWhiteSpace​(char[] array, int index, int length)
    • readNumber

      public static char[] readNumber​(char[] array, int idx, int len)
    • errorDetails

      public static java.lang.String errorDetails​(java.lang.String message, char[] array, int index, int ch)
    • debugCharDescription

      public static java.lang.String debugCharDescription​(int c)