DelegatedDurationField.java 3.41 KB
package org.joda.time.field;

import java.io.Serializable;
import org.joda.time.DurationField;
import org.joda.time.DurationFieldType;

public class DelegatedDurationField
  extends DurationField
  implements Serializable
{
  private static final long serialVersionUID = -5576443481242007829L;
  private final DurationField a;
  private final DurationFieldType b;
  
  protected DelegatedDurationField(DurationField paramDurationField)
  {
    this(paramDurationField, null);
  }
  
  protected DelegatedDurationField(DurationField paramDurationField, DurationFieldType paramDurationFieldType)
  {
    if (paramDurationField == null) {
      throw new IllegalArgumentException("The field must not be null");
    }
    this.a = paramDurationField;
    DurationFieldType localDurationFieldType = paramDurationFieldType;
    if (paramDurationFieldType == null) {
      localDurationFieldType = paramDurationField.getType();
    }
    this.b = localDurationFieldType;
  }
  
  public long add(long paramLong, int paramInt)
  {
    return this.a.add(paramLong, paramInt);
  }
  
  public long add(long paramLong1, long paramLong2)
  {
    return this.a.add(paramLong1, paramLong2);
  }
  
  public int compareTo(DurationField paramDurationField)
  {
    return this.a.compareTo(paramDurationField);
  }
  
  public boolean equals(Object paramObject)
  {
    if ((paramObject instanceof DelegatedDurationField)) {
      return this.a.equals(((DelegatedDurationField)paramObject).a);
    }
    return false;
  }
  
  public int getDifference(long paramLong1, long paramLong2)
  {
    return this.a.getDifference(paramLong1, paramLong2);
  }
  
  public long getDifferenceAsLong(long paramLong1, long paramLong2)
  {
    return this.a.getDifferenceAsLong(paramLong1, paramLong2);
  }
  
  public long getMillis(int paramInt)
  {
    return this.a.getMillis(paramInt);
  }
  
  public long getMillis(int paramInt, long paramLong)
  {
    return this.a.getMillis(paramInt, paramLong);
  }
  
  public long getMillis(long paramLong)
  {
    return this.a.getMillis(paramLong);
  }
  
  public long getMillis(long paramLong1, long paramLong2)
  {
    return this.a.getMillis(paramLong1, paramLong2);
  }
  
  public String getName()
  {
    return this.b.getName();
  }
  
  public DurationFieldType getType()
  {
    return this.b;
  }
  
  public long getUnitMillis()
  {
    return this.a.getUnitMillis();
  }
  
  public int getValue(long paramLong)
  {
    return this.a.getValue(paramLong);
  }
  
  public int getValue(long paramLong1, long paramLong2)
  {
    return this.a.getValue(paramLong1, paramLong2);
  }
  
  public long getValueAsLong(long paramLong)
  {
    return this.a.getValueAsLong(paramLong);
  }
  
  public long getValueAsLong(long paramLong1, long paramLong2)
  {
    return this.a.getValueAsLong(paramLong1, paramLong2);
  }
  
  public final DurationField getWrappedField()
  {
    return this.a;
  }
  
  public int hashCode()
  {
    return this.a.hashCode() ^ this.b.hashCode();
  }
  
  public boolean isPrecise()
  {
    return this.a.isPrecise();
  }
  
  public boolean isSupported()
  {
    return this.a.isSupported();
  }
  
  public String toString()
  {
    if (this.b == null) {
      return this.a.toString();
    }
    return "DurationField[" + this.b + ']';
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/org/joda/time/field/DelegatedDurationField.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */