Class ParamTokenizer


  • public class ParamTokenizer
    extends Object
    Separate parameters to admin commands into tokens. Mostly used for parameters that take a list of values separated by colons.
    Author:
    Bill Shannon
    • Field Detail

      • currentPosition

        protected int currentPosition
      • maxPosition

        protected int maxPosition
      • delimiter

        protected char delimiter
    • Constructor Detail

      • ParamTokenizer

        public ParamTokenizer​(String str,
                              char delimiter)
        Construct a tokenizer for the specified string.
        Parameters:
        str - a string to be parsed.
    • Method Detail

      • hasMoreTokens

        public boolean hasMoreTokens()
        Test 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.
      • nextTokenKeepEscapes

        public String nextTokenKeepEscapes()
                                    throws NoSuchElementException
        Return the next token from this tokenizer. Keep escapes and quotes intact.
        Returns:
        the next token from this tokenizer.
        Throws:
        NoSuchElementException - if there are no more tokens in this tokenizer's string.