01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.midp.i18n;
28:
29: /**
30: * The ResourceBundle interface is just a marker interface holding
31: * a particular contract for any localized file to obey.
32: */
33: public interface ResourceBundle {
34:
35: /**
36: * Fetch the resource content. ......
37: * @return array of key value pairs
38: */
39: public String getString(int index);
40:
41: /**
42: * Returns a locale-specific formatted date string. By default,
43: * it will return like "Fri, 05 Dec 2000".
44: *
45: * @param dayOfWeek day of week
46: * @param date date
47: * @param month month
48: * @param year year
49: * @return formatted date string
50: */
51: public String getLocalizedDateString(String dayOfWeek, String date,
52: String month, String year);
53:
54: /**
55: * Returns a locale-specific formatted time string. By default,
56: * it will return like "10:05:59 PM".
57: *
58: * @param hour hour
59: * @param min minute
60: * @param sec second
61: * @param ampm AM or PM
62: * @return formatted time string
63: */
64: public String getLocalizedTimeString(String hour, String min,
65: String sec, String ampm);
66:
67: /**
68: * Returns a locale-specific formatted date and time string. By
69: * default, it will like return "Fri, 05 Dec 2000 10:05:59 PM".
70: *
71: * @param dayOfWeek day of week
72: * @param date date
73: * @param month month
74: * @param year year
75: * @param hour hour
76: * @param min minute
77: * @param sec second
78: * @param ampm AM or PM
79: * @return formatted time and date string
80: */
81: public String getLocalizedDateTimeString(String dayOfWeek,
82: String date, String month, String year, String hour,
83: String min, String sec, String ampm);
84:
85: /**
86: * Returns what the first day of the week is; e.g., Sunday in US,
87: * Monday in France.
88: * @return numeric value for first day of week
89: */
90: public int getLocalizedFirstDayOfWeek();
91:
92: /**
93: * Returns whether the AM_PM field comes after the time field
94: * or not.
95: * @return true, if AM/PM is after the time field.
96: */
97: public boolean isLocalizedAMPMafterTime();
98: }
|