ezvcard.io.scribe
Class VCardPropertyScribe.Splitter

java.lang.Object
  extended by ezvcard.io.scribe.VCardPropertyScribe.Splitter
Enclosing class:
VCardPropertyScribe<T extends VCardProperty>

protected static class VCardPropertyScribe.Splitter
extends Object

Factory class for splitting strings.


Constructor Summary
VCardPropertyScribe.Splitter(String string, String delimiter)
          Creates a new splitter object.
 
Method Summary
 VCardPropertyScribe.Splitter limit(int limit)
          Sets the max number of split strings it should parse.
 VCardPropertyScribe.Splitter removeEmpties(boolean removeEmpties)
          Sets whether to remove empty elements.
 List<String> split()
          Performs the split operation.
 VCardPropertyScribe.Splitter unescape(boolean unescape)
          Sets whether to unescape each split string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCardPropertyScribe.Splitter

public VCardPropertyScribe.Splitter(String string,
                                    String delimiter)
Creates a new splitter object.

Parameters:
string - the string to split (e.g. "one,two,three")
delimiter - the delimiter (e.g. ",")
Method Detail

removeEmpties

public VCardPropertyScribe.Splitter removeEmpties(boolean removeEmpties)
Sets whether to remove empty elements.

Parameters:
removeEmpties - true to remove empty elements, false not to (default is false)
Returns:
this

unescape

public VCardPropertyScribe.Splitter unescape(boolean unescape)
Sets whether to unescape each split string.

Parameters:
unescape - true to unescape, false not to (default is false)
Returns:
this

limit

public VCardPropertyScribe.Splitter limit(int limit)
Sets the max number of split strings it should parse.

Parameters:
limit - the max number of split strings
Returns:
this

split

public List<String> split()
Performs the split operation.

Returns:
the split string


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.