Class LineTokenizer


  • class LineTokenizer
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int currentPosition  
      private int maxPosition  
      private static java.lang.String singles  
      private java.util.Vector stack  
      private java.lang.String str  
    • Constructor Summary

      Constructors 
      Constructor Description
      LineTokenizer​(java.lang.String str)
      Constructs a tokenizer for the specified string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasMoreTokens()
      Tests if there are more tokens available from this tokenizer's string.
      java.lang.String nextToken()
      Returns the next token from this tokenizer.
      void pushToken​(java.lang.String token)  
      private void skipWhiteSpace()
      Skips white space.
      • Methods inherited from class java.lang.Object

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

      • currentPosition

        private int currentPosition
      • maxPosition

        private int maxPosition
      • str

        private java.lang.String str
      • stack

        private java.util.Vector stack
    • Constructor Detail

      • LineTokenizer

        public LineTokenizer​(java.lang.String str)
        Constructs a tokenizer for the specified string.

        Parameters:
        str - a string to be parsed.
    • Method Detail

      • skipWhiteSpace

        private void skipWhiteSpace()
        Skips white space.
      • hasMoreTokens

        public boolean hasMoreTokens()
        Tests if there are more tokens available from this tokenizer's string.
        Returns:
        true if there are more tokens available from this tokenizer's string; false otherwise.
      • nextToken

        public java.lang.String nextToken()
        Returns the next token from this tokenizer.
        Returns:
        the next token from this tokenizer.
        Throws:
        java.util.NoSuchElementException - if there are no more tokens in this tokenizer's string.
      • pushToken

        public void pushToken​(java.lang.String token)