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