Package jodd.json

Class CharsInput

  • All Implemented Interfaces:
    java.lang.CharSequence
    Direct Known Subclasses:
    CharArrayInput, CharSequenceInput

    abstract class CharsInput
    extends java.lang.Object
    implements java.lang.CharSequence
    Scanner over an input that consist of characters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int ndx
      Current position.
      protected int total  
    • Constructor Summary

      Constructors 
      Constructor Description
      CharsInput​(int total)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract char charAtNdx()
      Returns character at current position.
      boolean isAtTheEnd()  
      boolean isEnd()  
      int length()
      Returns the total size of the input.
      abstract java.lang.String subString​(int from, int to)
      Returns a substring.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.CharSequence

        charAt, chars, codePoints, subSequence, toString
    • Field Detail

      • ndx

        protected int ndx
        Current position.
      • total

        protected final int total
    • Constructor Detail

      • CharsInput

        public CharsInput​(int total)
    • Method Detail

      • length

        public int length()
        Returns the total size of the input.
        Specified by:
        length in interface java.lang.CharSequence
      • charAtNdx

        public abstract char charAtNdx()
        Returns character at current position.
      • subString

        public abstract java.lang.String subString​(int from,
                                                   int to)
        Returns a substring.
      • isAtTheEnd

        public boolean isAtTheEnd()
      • isEnd

        public boolean isEnd()