net.sf.staccatocommons.check.format
Class Var

java.lang.Object
  extended by net.sf.staccatocommons.check.format.Var

public class Var
extends Object

A class methods to create debug string for pairs of variables names and values

Author:
flbulgarelli

Method Summary
static String format(String name, Object value)
          Creates a formatted string using the global VariableFormatter, for the given variable name an value
static String format(String name, Object value, String suffix)
          Creates a formatted string with a suffix
static String format(String prefix, String name, Object value)
          Creates a formatted string with a prefix
static String format(String prefix, String name, Object value, String suffix)
          Creates a formatted string with a prefix and a suffix
static void setVariableFormatter(VariableFormatter formatter)
          This method should never be invoker except during application startup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

format

public static String format(String name,
                            Object value)
Creates a formatted string using the global VariableFormatter, for the given variable name an value

Parameters:
name - the variable name to format- Non null.
value - the variable value to format. nullable
Returns:
the formatted string

format

public static String format(String prefix,
                            String name,
                            Object value,
                            String suffix)
Creates a formatted string with a prefix and a suffix

Parameters:
prefix - non null.
name - non null
value - nullable
suffix - non null
Returns:
the formatted string, non null.
See Also:
VariableFormatter.format(String, String, Object, String)

format

public static String format(String prefix,
                            String name,
                            Object value)
Creates a formatted string with a prefix

Parameters:
prefix - non null.
name - non null
value - nullable
Returns:
the formatted string, non null.
See Also:
VariableFormatter.format(String, String, Object)

format

public static String format(String name,
                            Object value,
                            String suffix)
Creates a formatted string with a suffix

Parameters:
suffix - non null.
name - non null
value - nullable
Returns:
the formatted string, non null.
See Also:
VariableFormatter.format(String, Object, String)

setVariableFormatter

public static void setVariableFormatter(VariableFormatter formatter)
This method should never be invoker except during application startup

Parameters:
formatter - the global VariableFormatter to set


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads