• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GENERATED SOURCE. DO NOT MODIFY. */
2 // © 2016 and later: Unicode, Inc. and others.
3 // License & terms of use: http://www.unicode.org/copyright.html#License
4 /*
5 ******************************************************************************
6 * Copyright (C) 2007, International Business Machines Corporation and   *
7 * others. All Rights Reserved.                                               *
8 ******************************************************************************
9 */
10 
11 package ohos.global.icu.impl.duration;
12 
13 /**
14  * Abstract factory interface used to create PeriodFormatters.
15  * PeriodFormatters are immutable once created.
16  * <p>
17  * Setters on the factory mutate the factory and return it,
18  * for chaining.
19  * @hide exposed on OHOS
20  */
21 public interface PeriodFormatterFactory {
22 
23   /**
24    * Set the name of the locale that will be used when
25    * creating new formatters.
26    *
27    * @param localeName the name of the Locale
28    * @return this PeriodFormatterFactory
29    */
setLocale(String localeName)30   public PeriodFormatterFactory setLocale(String localeName);
31 
32   /**
33    * Set whether limits will be displayed.
34    *
35    * @param display true if limits will be displayed
36    * @return this PeriodFormatterFactory
37    */
setDisplayLimit(boolean display)38   public PeriodFormatterFactory setDisplayLimit(boolean display);
39 
40   /**
41    * Set whether past and future will be displayed.
42    *
43    * @param display true if past and future will be displayed
44    * @return this PeriodFormatterFactory
45    */
setDisplayPastFuture(boolean display)46   public PeriodFormatterFactory setDisplayPastFuture(boolean display);
47 
48   /**
49    * Set how separators will be displayed.
50    *
51    * @param variant the variant indicating how separators will be displayed
52    * @return this PeriodFormatterFactory
53    */
setSeparatorVariant(int variant)54   public PeriodFormatterFactory setSeparatorVariant(int variant);
55 
56   /**
57    * Set the variant of the time unit names to use.
58    *
59    * @param variant the variant to use
60    * @return this PeriodFormatterFactory
61    */
setUnitVariant(int variant)62   public PeriodFormatterFactory setUnitVariant(int variant);
63 
64   /**
65    * Set the variant of the count to use.
66    *
67    * @param variant the variant to use
68    * @return this PeriodFormatterFactory
69    */
setCountVariant(int variant)70   public PeriodFormatterFactory setCountVariant(int variant);
71 
72   /**
73    * Return a formatter based on this factory's current settings.
74    *
75    * @return a PeriodFormatter
76    */
getFormatter()77   public PeriodFormatter getFormatter();
78 }
79