Brooklyn

brooklyn.util.text
[Java] Class StringFunctions

java.lang.Object
  brooklyn.util.text.StringFunctions

public class StringFunctions

Method Summary
static Function append(java.lang.String suffix)

static Function formatter(java.lang.String pattern)

given e.g.

static Function formatterForArray(java.lang.String pattern)

given e.g.

static Function joiner(java.lang.String separator)

joins the given objects in a collection as a toString with the given separator

static Function joinerForArray(java.lang.String separator)

joins the given objects as a toString with the given separator, but expecting an array of objects, not a collection

static Function surround(java.lang.String prefix, java.lang.String suffix)

Surrounds an input string with the given prefix and suffix

static Function toStringFunction()

provided here as a convenience; prefer Functions#toStringFunction()#toStringFunction()

static Function trim()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

append

public static Function append(java.lang.String suffix)


formatter

public static Function formatter(java.lang.String pattern)
given e.g. "hello %s" returns a function which will insert a string into that pattern


formatterForArray

public static Function formatterForArray(java.lang.String pattern)
given e.g. "hello %s %s" returns a function which will insert an array of two strings into that pattern


joiner

public static Function joiner(java.lang.String separator)
joins the given objects in a collection as a toString with the given separator


joinerForArray

public static Function joinerForArray(java.lang.String separator)
joins the given objects as a toString with the given separator, but expecting an array of objects, not a collection


surround

public static Function surround(java.lang.String prefix, java.lang.String suffix)
Surrounds an input string with the given prefix and suffix


toStringFunction

public static Function toStringFunction()
provided here as a convenience; prefer Functions#toStringFunction()#toStringFunction()


trim

public static Function trim()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.