Top Description Methods
com.ibm.icu.impl.duration

public Interface PeriodFormatterFactory

Known Direct Implementers
com.ibm.icu.impl.duration.BasicPeriodFormatterFactory

Abstract factory interface used to create PeriodFormatters. PeriodFormatters are immutable once created.

Setters on the factory mutate the factory and return it, for chaining.

Method Summary

Modifier and TypeMethod and Description
public PeriodFormatter

Returns:

a PeriodFormatter
getFormatter
()

Return a formatter based on this factory's current settings.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setCountVariant
(int
the variant to use
variant
)

Set the variant of the count to use.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setDisplayLimit
(boolean
true if limits will be displayed
display
)

Set whether limits will be displayed.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setDisplayPastFuture
(boolean
true if past and future will be displayed
display
)

Set whether past and future will be displayed.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setLocale
(String
the name of the Locale
localeName
)

Set the name of the locale that will be used when creating new formatters.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setSeparatorVariant
(int
the variant indicating how separators will be displayed
variant
)

Set how separators will be displayed.

public PeriodFormatterFactory

Returns:

this PeriodFormatterFactory
setUnitVariant
(int
the variant to use
variant
)

Set the variant of the time unit names to use.

Method Detail

getFormatterback to summary
public PeriodFormatter getFormatter()

Return a formatter based on this factory's current settings.

Returns:PeriodFormatter

a PeriodFormatter

setCountVariantback to summary
public PeriodFormatterFactory setCountVariant(int variant)

Set the variant of the count to use.

Parameters
variant:int

the variant to use

Returns:PeriodFormatterFactory

this PeriodFormatterFactory

setDisplayLimitback to summary
public PeriodFormatterFactory setDisplayLimit(boolean display)

Set whether limits will be displayed.

Parameters
display:boolean

true if limits will be displayed

Returns:PeriodFormatterFactory

this PeriodFormatterFactory

setDisplayPastFutureback to summary
public PeriodFormatterFactory setDisplayPastFuture(boolean display)

Set whether past and future will be displayed.

Parameters
display:boolean

true if past and future will be displayed

Returns:PeriodFormatterFactory

this PeriodFormatterFactory

setLocaleback to summary
public PeriodFormatterFactory setLocale(String localeName)

Set the name of the locale that will be used when creating new formatters.

Parameters
localeName:String

the name of the Locale

Returns:PeriodFormatterFactory

this PeriodFormatterFactory

setSeparatorVariantback to summary
public PeriodFormatterFactory setSeparatorVariant(int variant)

Set how separators will be displayed.

Parameters
variant:int

the variant indicating how separators will be displayed

Returns:PeriodFormatterFactory

this PeriodFormatterFactory

setUnitVariantback to summary
public PeriodFormatterFactory setUnitVariant(int variant)

Set the variant of the time unit names to use.

Parameters
variant:int

the variant to use

Returns:PeriodFormatterFactory

this PeriodFormatterFactory