01: /*
02: * Copyright 2001-2005 Stephen Colebourne
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.joda.time.convert;
17:
18: import java.util.Calendar;
19: import java.util.TimeZone;
20:
21: /**
22: * A basic mock testing class for an unknown calendar.
23: *
24: * @author Stephen Colebourne
25: */
26: class MockUnknownCalendar extends Calendar {
27:
28: private long millis;
29: private TimeZone zone;
30:
31: MockUnknownCalendar(long millis) {
32: this .millis = millis;
33: }
34:
35: MockUnknownCalendar(TimeZone zone) {
36: this .zone = zone;
37: }
38:
39: public long getTimeInMillis() {
40: return millis;
41: }
42:
43: public TimeZone getTimeZone() {
44: return zone;
45: }
46:
47: protected void computeTime() {
48: }
49:
50: protected void computeFields() {
51: }
52:
53: public void add(int field, int amount) {
54: }
55:
56: public void roll(int field, boolean up) {
57: }
58:
59: public int getMinimum(int field) {
60: return 0;
61: }
62:
63: public int getMaximum(int field) {
64: return 0;
65: }
66:
67: public int getGreatestMinimum(int field) {
68: return 0;
69: }
70:
71: public int getLeastMaximum(int field) {
72: return 0;
73: }
74:
75: }
|