org.hibernate.envers.tools
Class StringTools

java.lang.Object
  extended by org.hibernate.envers.tools.StringTools

public class StringTools
extends Object

Author:
Adam Warski (adam at warski dot org)

Constructor Summary
StringTools()
           
 
Method Summary
static void append(StringBuilder sb, Iterator<String> contents, String separator)
          To the given string builder, appends all strings in the given iterator, separating them with the given separator.
static String getLastComponent(String s)
           
static boolean isEmpty(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTools

public StringTools()
Method Detail

isEmpty

public static boolean isEmpty(String s)

getLastComponent

public static String getLastComponent(String s)
Parameters:
s - String, from which to get the last component.
Returns:
The last component of the dot-separated string s. For example, for a string "a.b.c", the result is "c".

append

public static void append(StringBuilder sb,
                          Iterator<String> contents,
                          String separator)
To the given string builder, appends all strings in the given iterator, separating them with the given separator. For example, for an interator "a" "b" "c" and separator ":" the output is "a:b:c".

Parameters:
sb - String builder, to which to append.
contents - Strings to be appended.
separator - Separator between subsequent content.


Copyright © 2002-2009 Red Hat Middleware, LLC. All Rights Reserved