예제 #1
0
 /**
  * Constructor.
  *
  * @param field the base field
  * @param type the field type to use
  */
 protected DelegatedDurationField(DurationField field, DurationFieldType type) {
   super();
   if (field == null) {
     throw new IllegalArgumentException("The field must not be null");
   }
   iField = field;
   iType = (type == null ? field.getType() : type);
 }
예제 #2
0
 public boolean isPrecise() {
   return iField.isPrecise();
 }
예제 #3
0
 /** Returns true if this field is supported. */
 public boolean isSupported() {
   return iField.isSupported();
 }
예제 #4
0
 public String toString() {
   return (iType == null) ? iField.toString() : ("DurationField[" + iType + ']');
 }
예제 #5
0
 public boolean equals(Object obj) {
   if (obj instanceof DelegatedDurationField) {
     return iField.equals(((DelegatedDurationField) obj).iField);
   }
   return false;
 }
예제 #6
0
 public int hashCode() {
   return iField.hashCode() ^ iType.hashCode();
 }
예제 #7
0
 public long getUnitMillis() {
   return iField.getUnitMillis();
 }
예제 #8
0
 public long getValueAsLong(long duration, long instant) {
   return iField.getValueAsLong(duration, instant);
 }
예제 #9
0
 public int getDifference(long minuendInstant, long subtrahendInstant) {
   return iField.getDifference(minuendInstant, subtrahendInstant);
 }
예제 #10
0
 public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant) {
   return iField.getDifferenceAsLong(minuendInstant, subtrahendInstant);
 }
예제 #11
0
 public long add(long instant, long value) {
   return iField.add(instant, value);
 }
예제 #12
0
 public long getMillis(long value, long instant) {
   return iField.getMillis(value, instant);
 }
예제 #13
0
 public long getMillis(long value) {
   return iField.getMillis(value);
 }
예제 #14
0
 public int getValue(long duration) {
   return iField.getValue(duration);
 }
예제 #15
0
 public int compareTo(DurationField durationField) {
   return iField.compareTo(durationField);
 }
예제 #16
0
 public long getValueAsLong(long duration) {
   return iField.getValueAsLong(duration);
 }
예제 #17
0
 public int getValue(long duration, long instant) {
   return iField.getValue(duration, instant);
 }