1 /* ============================================================
2  * JRobin : Pure java implementation of RRDTool's functionality
3  * ============================================================
4  *
5  * Project Info:  http://www.jrobin.org
6  * Project Lead:  Sasa Markovic (saxon@jrobin.org);
7  *
8  * (C) Copyright 2003-2005, by Sasa Markovic.
9  *
10  * Developers:    Sasa Markovic (saxon@jrobin.org)
11  *
12  *
13  * This library is free software; you can redistribute it and/or modify it under the terms
14  * of the GNU Lesser General Public License as published by the Free Software Foundation;
15  * either version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
18  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  * See the GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public License along with this
22  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */

25
26 package org.jrobin.core.timespec;
27
28 class TimeToken {
29     public static final int MIDNIGHT = 1;
30     public static final int NOON = 2;
31     public static final int TEATIME = 3;
32     public static final int PM = 4;
33     public static final int AM = 5;
34     public static final int YESTERDAY = 6;
35     public static final int TODAY = 7;
36     public static final int TOMORROW = 8;
37     public static final int NOW = 9;
38     public static final int START = 10;
39     public static final int END = 11;
40     public static final int SECONDS = 12;
41     public static final int MINUTES = 13;
42     public static final int HOURS = 14;
43     public static final int DAYS = 15;
44     public static final int WEEKS = 16;
45     public static final int MONTHS = 17;
46     public static final int YEARS = 18;
47     public static final int MONTHS_MINUTES = 19;
48     public static final int NUMBER = 20;
49     public static final int PLUS = 21;
50     public static final int MINUS = 22;
51     public static final int DOT = 23;
52     public static final int COLON = 24;
53     public static final int SLASH = 25;
54     public static final int ID = 26;
55     public static final int JUNK = 27;
56     public static final int JAN = 28;
57     public static final int FEB = 29;
58     public static final int MAR = 30;
59     public static final int APR = 31;
60     public static final int MAY = 32;
61     public static final int JUN = 33;
62     public static final int JUL = 34;
63     public static final int AUG = 35;
64     public static final int SEP = 36;
65     public static final int OCT = 37;
66     public static final int NOV = 38;
67     public static final int DEC = 39;
68     public static final int SUN = 40;
69     public static final int MON = 41;
70     public static final int TUE = 42;
71     public static final int WED = 43;
72     public static final int THU = 44;
73     public static final int FRI = 45;
74     public static final int SAT = 46;
75     public static final int EOF = -1;
76
77     final String value; /* token name */
78     final int id;   /* token id */
79
80     public TimeToken(String value, int id) {
81         this.value = value;
82         this.id = id;
83     }
84
85     public String toString() {
86         return value + " [" + id + "]";
87     }
88 }