public class TextBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextBuilder.DefaultStringize
Default Delegate used by TextBuilder.
|
| Modifier and Type | Field and Description |
|---|---|
static Delegator |
STRINGIZER_DELEGATE |
| Constructor and Description |
|---|
TextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
join(List pathParts,
String seperator)
Join with a list using "toString" method of each object in the list
|
static String |
join(List pathParts,
String seperator,
IDelegate stringize)
Join with a list using specific method to join
|
static String |
join(Object[] pathParts,
String seperator)
Join an array of objects using their "toString" method.
|
static String |
join(Object[] pathParts,
String seperator,
IDelegate stringize)
Join an array of objects using a specific method common to all objects
|
static void |
splitPrefix(String source,
char separator,
StringBuffer prefix,
StringBuffer suffix)
Split a string at the first occurrence of a character.
|
public static final Delegator STRINGIZER_DELEGATE
public static void splitPrefix(String source, char separator, StringBuffer prefix, StringBuffer suffix)
source - - string to splitseparator - - character for splitprefix - - string before the separatorsuffix - - string after the separatorpublic static String join(Object[] pathParts, String seperator)
String[] input = {"the", "join", "example"};
String result = TextBuilder.join(input, ":");
Result is "the:join:example"pathParts - - objects to joinseperator - - character used to separate objectspublic static String join(Object[] pathParts, String seperator, IDelegate stringize)
pathParts - - objects to joinseperator - - character to separate objectstringize - - Method on objects to obtain string. All objects in list must declare this method as public.public static String join(List pathParts, String seperator)
pathParts - - list of objects to joinseperator - - character used to separate each objectjoin(Object[], String)public static String join(List pathParts, String seperator, IDelegate stringize)
pathParts - - List of objects to joinseperator - - character used to separate each objectstringize - - method on object. All objects in list must declare this method as public.join(Object[], String, IDelegate)Copyright © 2016 VersionOne, Inc.. All rights reserved.