public class

DefaultContext

extends Object
implements Context StandardContext
java.lang.Object
   ↳ humanize.spi.context.DefaultContext

Class Overview

Default implementation of Context.

Summary

Public Constructors
DefaultContext()
DefaultContext(Locale locale)
Public Methods
String digitStrings(int index)
String formatDate(int style, Date value)
String formatDateTime(int dateStyle, int timeStyle, Date date)
String formatDateTime(Date date)
String formatDecimal(Number value)
String formatMessage(String key, Object... args)
String formatRelativeDate(Date reference, Date duration)
String formatRelativeDate(Date reference, Date duration, long precision)
ResourceBundle getBundle()
DecimalFormat getCurrencyFormat()
DateFormat getDateFormat(int style)
DateFormat getDateFormat(String pattern)
DateFormat getDateTimeFormat(int dateStyle, int timeStyle)
DateFormat getDateTimeFormat()
DecimalFormat getDecimalFormat()
Locale getLocale()
MaskFormat getMaskFormat()
String getMessage(String key)
MessageFormat getMessageFormat()
NumberFormat getNumberFormat()
DecimalFormat getPercentFormat()
PrettyTimeFormat getPrettyTimeFormat()
String ordinalSuffix(int index)
void setLocale(Locale locale)
String timeSuffix(int index)
Protected Methods
String getStringByIndex(String cacheName, int index)
Collection<String> getStringList(String cacheName)
String[] getStrings(String cacheName)
[Expand]
Inherited Methods
From class java.lang.Object
From interface humanize.spi.context.Context
From interface humanize.spi.context.StandardContext

Public Constructors

public DefaultContext ()

public DefaultContext (Locale locale)

Public Methods

public String digitStrings (int index)

public String formatDate (int style, Date value)

public String formatDateTime (int dateStyle, int timeStyle, Date date)

public String formatDateTime (Date date)

public String formatDecimal (Number value)

public String formatMessage (String key, Object... args)

public String formatRelativeDate (Date reference, Date duration)

public String formatRelativeDate (Date reference, Date duration, long precision)

public ResourceBundle getBundle ()

public DecimalFormat getCurrencyFormat ()

public DateFormat getDateFormat (int style)

public DateFormat getDateFormat (String pattern)

public DateFormat getDateTimeFormat (int dateStyle, int timeStyle)

public DateFormat getDateTimeFormat ()

public DecimalFormat getDecimalFormat ()

public Locale getLocale ()

public MaskFormat getMaskFormat ()

public String getMessage (String key)

public MessageFormat getMessageFormat ()

public NumberFormat getNumberFormat ()

public DecimalFormat getPercentFormat ()

public PrettyTimeFormat getPrettyTimeFormat ()

public String ordinalSuffix (int index)

public void setLocale (Locale locale)

public String timeSuffix (int index)

Protected Methods

protected String getStringByIndex (String cacheName, int index)

protected Collection<String> getStringList (String cacheName)

protected String[] getStrings (String cacheName)