Class ValueDecoderFactory.DecoderBase

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int mNextPtr
      Pointer to the next character to check, within lexical value
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DecoderBase()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String _clean​(java.lang.String str)  
      protected java.lang.IllegalArgumentException constructInvalidValue​(char[] lexical, int startOffset, int end)  
      protected java.lang.IllegalArgumentException constructInvalidValue​(java.lang.String lexical)  
      abstract java.lang.String getType()  
      void handleEmptyValue()
      Method called if the value to decode does not contain any non-white space characters (including the case where typed accessor is called for an empty element).
      protected java.lang.String lexicalDesc​(char[] lexical, int startOffset, int end)  
      protected java.lang.String lexicalDesc​(java.lang.String lexical)  
      protected static int parseInt​(char[] digitChars, int start, int end)
      Fast method for parsing integers that are known to fit into regular 32-bit signed int type.
      protected static int parseInt​(int num, char[] digitChars, int start, int end)  
      protected static int parseInt​(int num, java.lang.String digitChars, int start, int end)  
      protected static int parseInt​(java.lang.String digitChars, int start, int end)  
      protected static long parseLong​(char[] digitChars, int start, int end)  
      protected static long parseLong​(java.lang.String digitChars, int start, int end)  
      protected int skipSignAndZeroes​(char[] lexical, char ch, boolean hasSign, int start, int end)  
      protected int skipSignAndZeroes​(java.lang.String lexical, char ch, boolean hasSign, int end)  
      protected void verifyDigits​(char[] lexical, int start, int end, int ptr)  
      protected void verifyDigits​(java.lang.String lexical, int start, int end)
      Method called to check that remaining String consists of zero or more digits
      • Methods inherited from class java.lang.Object

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

      • mNextPtr

        protected int mNextPtr
        Pointer to the next character to check, within lexical value
    • Constructor Detail

      • DecoderBase

        protected DecoderBase()
    • Method Detail

      • getType

        public abstract java.lang.String getType()
      • handleEmptyValue

        public void handleEmptyValue()
        Method called if the value to decode does not contain any non-white space characters (including the case where typed accessor is called for an empty element).
        Specified by:
        handleEmptyValue in class TypedValueDecoder
      • verifyDigits

        protected void verifyDigits​(java.lang.String lexical,
                                    int start,
                                    int end)
        Method called to check that remaining String consists of zero or more digits
      • verifyDigits

        protected void verifyDigits​(char[] lexical,
                                    int start,
                                    int end,
                                    int ptr)
      • skipSignAndZeroes

        protected int skipSignAndZeroes​(java.lang.String lexical,
                                        char ch,
                                        boolean hasSign,
                                        int end)
        Returns:
        Numeric value of the first non-zero character (or, in case of a zero value, zero)
      • skipSignAndZeroes

        protected int skipSignAndZeroes​(char[] lexical,
                                        char ch,
                                        boolean hasSign,
                                        int start,
                                        int end)
      • parseInt

        protected static final int parseInt​(char[] digitChars,
                                            int start,
                                            int end)
        Fast method for parsing integers that are known to fit into regular 32-bit signed int type. This means that length is between 1 and 9 digits (inclusive)
        Returns:
        Parsed integer value
      • parseInt

        protected static final int parseInt​(int num,
                                            char[] digitChars,
                                            int start,
                                            int end)
      • parseInt

        protected static final int parseInt​(java.lang.String digitChars,
                                            int start,
                                            int end)
      • parseInt

        protected static final int parseInt​(int num,
                                            java.lang.String digitChars,
                                            int start,
                                            int end)
      • parseLong

        protected static final long parseLong​(char[] digitChars,
                                              int start,
                                              int end)
      • parseLong

        protected static final long parseLong​(java.lang.String digitChars,
                                              int start,
                                              int end)
      • constructInvalidValue

        protected java.lang.IllegalArgumentException constructInvalidValue​(java.lang.String lexical)
      • constructInvalidValue

        protected java.lang.IllegalArgumentException constructInvalidValue​(char[] lexical,
                                                                           int startOffset,
                                                                           int end)
      • lexicalDesc

        protected java.lang.String lexicalDesc​(char[] lexical,
                                               int startOffset,
                                               int end)
      • lexicalDesc

        protected java.lang.String lexicalDesc​(java.lang.String lexical)
      • _clean

        protected java.lang.String _clean​(java.lang.String str)