Пример #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);
 }