/**
  * 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);
 }
 public boolean isPrecise() {
   return iField.isPrecise();
 }
 /** Returns true if this field is supported. */
 public boolean isSupported() {
   return iField.isSupported();
 }
 public String toString() {
   return (iType == null) ? iField.toString() : ("DurationField[" + iType + ']');
 }
 public boolean equals(Object obj) {
   if (obj instanceof DelegatedDurationField) {
     return iField.equals(((DelegatedDurationField) obj).iField);
   }
   return false;
 }
 public int hashCode() {
   return iField.hashCode() ^ iType.hashCode();
 }
 public long getUnitMillis() {
   return iField.getUnitMillis();
 }
 public long getValueAsLong(long duration, long instant) {
   return iField.getValueAsLong(duration, instant);
 }
 public int getDifference(long minuendInstant, long subtrahendInstant) {
   return iField.getDifference(minuendInstant, subtrahendInstant);
 }
Esempio n. 10
0
 public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant) {
   return iField.getDifferenceAsLong(minuendInstant, subtrahendInstant);
 }
Esempio n. 11
0
 public long add(long instant, long value) {
   return iField.add(instant, value);
 }
Esempio n. 12
0
 public long getMillis(long value, long instant) {
   return iField.getMillis(value, instant);
 }
Esempio n. 13
0
 public long getMillis(long value) {
   return iField.getMillis(value);
 }
Esempio n. 14
0
 public int getValue(long duration) {
   return iField.getValue(duration);
 }
Esempio n. 15
0
 public int compareTo(DurationField durationField) {
   return iField.compareTo(durationField);
 }
Esempio n. 16
0
 public long getValueAsLong(long duration) {
   return iField.getValueAsLong(duration);
 }
Esempio n. 17
0
 public int getValue(long duration, long instant) {
   return iField.getValue(duration, instant);
 }