]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_8_1_1/main/classes/core/src/com/ibm/icu/impl/duration/PeriodFormatterFactory.java
Added flags.
[Dictionary.git] / jars / icu4j-4_8_1_1 / main / classes / core / src / com / ibm / icu / impl / duration / PeriodFormatterFactory.java
1 /*
2 ******************************************************************************
3 * Copyright (C) 2007, International Business Machines Corporation and   *
4 * others. All Rights Reserved.                                               *
5 ******************************************************************************
6 */
7
8 package com.ibm.icu.impl.duration;
9
10 /**
11  * Abstract factory interface used to create PeriodFormatters.
12  * PeriodFormatters are immutable once created.
13  * <p>
14  * Setters on the factory mutate the factory and return it,
15  * for chaining.
16  */
17 public interface PeriodFormatterFactory {
18
19   /**
20    * Set the name of the locale that will be used when 
21    * creating new formatters.
22    *
23    * @param localeName the name of the Locale
24    * @return this PeriodFormatterFactory
25    */
26   public PeriodFormatterFactory setLocale(String localeName);
27
28   /**
29    * Set whether limits will be displayed.
30    *
31    * @param display true if limits will be displayed
32    * @return this PeriodFormatterFactory
33    */
34   public PeriodFormatterFactory setDisplayLimit(boolean display);
35
36   /**
37    * Set whether past and future will be displayed.
38    *
39    * @param display true if past and future will be displayed
40    * @return this PeriodFormatterFactory
41    */
42   public PeriodFormatterFactory setDisplayPastFuture(boolean display);
43
44   /**
45    * Set how separators will be displayed.
46    *
47    * @param variant the variant indicating how separators will be displayed
48    * @return this PeriodFormatterFactory
49    */
50   public PeriodFormatterFactory setSeparatorVariant(int variant);
51
52   /**
53    * Set the variant of the time unit names to use.
54    *
55    * @param variant the variant to use
56    * @return this PeriodFormatterFactory
57    */
58   public PeriodFormatterFactory setUnitVariant(int variant);
59
60   /**
61    * Set the variant of the count to use.
62    *
63    * @param variant the variant to use
64    * @return this PeriodFormatterFactory
65    */
66   public PeriodFormatterFactory setCountVariant(int variant);
67
68   /**
69    * Return a formatter based on this factory's current settings.
70    *
71    * @return a PeriodFormatter
72    */
73   public PeriodFormatter getFormatter();
74 }