1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.joda.time.field;
17
18 import org.joda.time.DateTimeField;
19 import org.joda.time.DateTimeFieldType;
20 import org.joda.time.DurationField;
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 public abstract class DecoratedDateTimeField extends BaseDateTimeField {
40
41
42 private static final long serialVersionUID = 203115783733757597L;
43
44
45 private final DateTimeField iField;
46
47
48
49
50
51
52
53 protected DecoratedDateTimeField(DateTimeField field, DateTimeFieldType type) {
54 super(type);
55 if (field == null) {
56 throw new IllegalArgumentException("The field must not be null");
57 }
58 if (!field.isSupported()) {
59 throw new IllegalArgumentException("The field must be supported");
60 }
61 iField = field;
62 }
63
64
65
66
67
68
69 public final DateTimeField getWrappedField() {
70 return iField;
71 }
72
73 public boolean isLenient() {
74 return iField.isLenient();
75 }
76
77 public int get(long instant) {
78 return iField.get(instant);
79 }
80
81 public long set(long instant, int value) {
82 return iField.set(instant, value);
83 }
84
85 public DurationField getDurationField() {
86 return iField.getDurationField();
87 }
88
89 public DurationField getRangeDurationField() {
90 return iField.getRangeDurationField();
91 }
92
93 public int getMinimumValue() {
94 return iField.getMinimumValue();
95 }
96
97 public int getMaximumValue() {
98 return iField.getMaximumValue();
99 }
100
101 public long roundFloor(long instant) {
102 return iField.roundFloor(instant);
103 }
104
105 }