Rev | Line | |
---|
[237] | 1 | package net.sabi.pester;
|
---|
| 2 |
|
---|
| 3 | import java.util.Comparator;
|
---|
| 4 | import danger.app.DataStore;
|
---|
| 5 |
|
---|
| 6 | public class Alarms {
|
---|
| 7 | // max # records in a datastore
|
---|
| 8 | private static final int MAX_ALARM_COUNT = 50;
|
---|
| 9 |
|
---|
| 10 | private static Alarms sAlarms = null;
|
---|
| 11 | private static DataStore sDataStore;
|
---|
| 12 |
|
---|
| 13 | private Alarms() {
|
---|
| 14 | sDataStore = DataStore.createDataStore("alarms", true /* auto sync */);
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | public static Alarms getInstance() {
|
---|
| 18 | if (sAlarms == null)
|
---|
| 19 | sAlarms = new Alarms();
|
---|
| 20 |
|
---|
| 21 | return sAlarms;
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | /*
|
---|
| 25 | private static Alarm sAlarm0 = new Alarm();
|
---|
| 26 | private static Alarm sAlarm1 = new Alarm();
|
---|
| 27 | public int compare(Object arg0, Object arg1) {
|
---|
| 28 |
|
---|
| 29 | return Collator.getInstance().compare(
|
---|
| 30 | }
|
---|
| 31 | */
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.