com.realtime.crossfire.jxclient.util
Class Formatter

java.lang.Object
  extended by com.realtime.crossfire.jxclient.util.Formatter

public class Formatter
extends java.lang.Object

Utility class for formatting values into strings.


Constructor Summary
private Formatter()
          Private constructor to prevent instantiation.
 
Method Summary
static java.lang.String formatFloat(double value, int digits)
          Formats a float value for display.
static java.lang.String formatLong(long value)
          Returns a long value formatted as a human readable string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

private Formatter()
Private constructor to prevent instantiation.

Method Detail

formatFloat

@NotNull
public static java.lang.String formatFloat(double value,
                                                   int digits)
Formats a float value for display.

Parameters:
value - the float value
digits - the number of fraction digits; must be between 1..3 inclusive
Returns:
the formatted value

formatLong

@NotNull
public static java.lang.String formatLong(long value)
Returns a long value formatted as a human readable string.

Parameters:
value - the value
Returns:
return the formatted value