org.apache.accumulo.core.util.shell
Class QuotedStringTokenizer

java.lang.Object
  extended by org.apache.accumulo.core.util.shell.QuotedStringTokenizer
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>

public class QuotedStringTokenizer
extends java.lang.Object
implements java.lang.Iterable<java.lang.String>

A basic tokenizer for generating tokens from a string. It understands quoted strings and escaped quote characters. You can use the escape sequence '\' to escape single quotes, double quotes, and spaces only, in addition to the escape character itself. The behavior is the same for single and double quoted strings. (i.e. '\'' is the same as "\'")


Constructor Summary
QuotedStringTokenizer(java.lang.String t)
           
 
Method Summary
 java.lang.String[] getTokens()
           
 java.util.Iterator<java.lang.String> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuotedStringTokenizer

public QuotedStringTokenizer(java.lang.String t)
                      throws BadArgumentException
Throws:
BadArgumentException
Method Detail

getTokens

public java.lang.String[] getTokens()

iterator

public java.util.Iterator<java.lang.String> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.lang.String>


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.