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

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

public class QuotedStringTokenizer
extends Object
implements Iterable<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(String t)
           
 
Method Summary
 String[] getTokens()
           
 Iterator<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(String t)
                      throws BadArgumentException
Throws:
BadArgumentException
Method Detail

getTokens

public String[] getTokens()

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>


Copyright © 2015 Apache Accumulo Project. All rights reserved.