hudson.plugins.violations.util
Class StringUtil

java.lang.Object
  extended by hudson.plugins.violations.util.StringUtil

public final class StringUtil
extends Object

A utility class for strings.


Method Summary
static boolean isBlank(String str)
          Check if the string is null or all spaces.
static String relativePath(String self, String other)
          Returns a relative path from the self to the other path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isBlank

public static boolean isBlank(String str)
Check if the string is null or all spaces.

Parameters:
str - the string to test.
Returns:
true if string is null or all spaces.

relativePath

public static String relativePath(String self,
                                  String other)
Returns a relative path from the self to the other path. Note that the self and other paths must have '/' as the separator.

Parameters:
self - the path to get a relative path from.
other - the path to get a relative path to.
Returns:
a string containing a relative path from self to other path.


Copyright © 2004-2012 Hudson. All Rights Reserved.