2 * This file is part of NeverNote
\r
3 * Copyright 2009 Randy Baumgarte
\r
5 * This file may be licensed under the terms of of the
\r
6 * GNU General Public License Version 2 (the ``GPL'').
\r
8 * Software distributed under the License is distributed
\r
9 * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
\r
10 * express or implied. See the GPL for the specific language
\r
11 * governing rights and limitations.
\r
13 * You should have received a copy of the GPL along with this
\r
14 * program. If not, go to http://www.gnu.org/licenses/gpl.html
\r
15 * or write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
19 package cx.fbn.nevernote.utilities;
\r
21 import java.util.ArrayList;
\r
22 import java.util.List;
\r
24 public class SyncTimes {
\r
25 private final List<String> stringTimes;
\r
26 private final List<Integer> minuteTimes;
\r
28 public SyncTimes() {
\r
29 stringTimes = new ArrayList<String>();
\r
30 minuteTimes = new ArrayList<Integer>();
\r
32 stringTimes.add("manually");
\r
35 stringTimes.add("15 minutes");
\r
36 minuteTimes.add(15);
\r
38 stringTimes.add("30 minutes");
\r
39 minuteTimes.add(30);
\r
41 stringTimes.add("45 minutes");
\r
42 minuteTimes.add(45);
\r
44 stringTimes.add("60 minutes");
\r
45 minuteTimes.add(60);
\r
47 stringTimes.add("120 minutes");
\r
48 minuteTimes.add(120);
\r
50 stringTimes.add("240 minutes");
\r
51 minuteTimes.add(240);
\r
53 stringTimes.add("600 minutes");
\r
54 minuteTimes.add(600);
\r
56 stringTimes.add("Shortly after the end of the world");
\r
57 minuteTimes.add(-1);
\r
60 public List<String> stringValues() {
\r
64 public int timeValue(String t) {
\r
65 for (int i=0; i<stringTimes.size(); i++)
\r
66 if (stringTimes.get(i).equalsIgnoreCase(t))
\r
67 return minuteTimes.get(i);
\r