|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.anteater.util.Utils
Various utility methods.
Method Summary | |
static String |
compare(String expected,
String actual)
Resolve a reference to a resource. |
static String |
compareWeak(String expected,
String actual)
String comparison with precise error reporting, ignoring whitespace. |
static String |
interpolate(Map map,
String rawValue)
Replace ${variables} in a string with values from a Map. |
static String |
normalizeSpaces(String s)
Utility to normalize whitespace in a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static String compare(String expected, String actual)
null
if
they do.public static String compareWeak(String expected, String actual)
compare(java.lang.String, java.lang.String)
, but ignores whitespace [\t\n\r\f].
null
if
they do.public static String normalizeSpaces(String s)
s
- String to normalize
public static String interpolate(Map map, String rawValue)
map
- a map of key-value pairs.rawValue
- String containing ${variable} references to replace
rawValue
string with variables interpolated
RuntimeException
- if any variables are undefined.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |