org.apache.maven.util
Class DVSLFormatter

java.lang.Object
  extended byorg.apache.maven.util.DVSLFormatter

public class DVSLFormatter
extends java.lang.Object

Formatting tool for use with the DVSL toolbox. This class contains static methods to assist in formatting needs that can't be done or shouldn't be done in a DVSL stylesheet.

Version:
$Id: DVSLFormatter.java 517014 2007-03-11 21:15:50Z ltheussl $
Author:
Pete Kazmier
To Do:
move to org.apache.maven.util or make a jelly tag

Constructor Summary
DVSLFormatter()
           
 
Method Summary
static java.lang.String formatNumber(java.lang.String value, java.lang.String pattern)
          Formats a string as a number using the specified pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DVSLFormatter

public DVSLFormatter()
Method Detail

formatNumber

public static final java.lang.String formatNumber(java.lang.String value,
                                                  java.lang.String pattern)
Formats a string as a number using the specified pattern. Patterns are specified using the same format as java.text.DecimalFormat.

This method is thread-hostile.

Parameters:
value - The number to format.
pattern - The pattern used to format.
Returns:
A string formatted using the specified pattern.
Throws:
java.lang.IllegalArgumentException - If an invalid pattern is specified.
See Also:
DecimalFormat


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.