org.apache.accumulo.core.util.shell.commands
Class EscapeTokenizer
java.lang.Object
org.apache.accumulo.core.util.shell.commands.EscapeTokenizer
- All Implemented Interfaces:
- Iterable<String>
public class EscapeTokenizer
- extends Object
- implements Iterable<String>
EscapeTokenizer - Supports tokenizing with delimiters while being able to escape the delims. String "1,2,3,4" with delims "," = ["1", "2", "3", "4"] String
"1\,2,3,4" with delims "," = ["1,2", "3", "4"]
- The escape char '\' only has a special meaning when it is before a delim String "1,\2,3,4" with delims "," = ["1" , "\2", "3", "4"]
- Multiple delims in a row are considered one delim String "1,,,,,,,,,,,,,,2,3,4","," with delims "," = ["1", "2", "3", "4"]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EscapeTokenizer
public EscapeTokenizer(String line,
String delimeters)
iterator
public Iterator<String> iterator()
- Specified by:
iterator
in interface Iterable<String>
count
public int count()
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.