| java.lang.Object org.joda.time.DurationField org.joda.time.field.BaseDurationField org.joda.time.field.DecoratedDurationField
All known Subclasses: org.joda.time.field.ScaledDurationField,
DecoratedDurationField | public class DecoratedDurationField extends BaseDurationField (Code) | | DecoratedDurationField extends
BaseDurationField ,
implementing only the minimum required set of methods. These implemented
methods delegate to a wrapped field.
This design allows new DurationField types to be defined that piggyback on
top of another, inheriting all the safe method implementations from
BaseDurationField. Should any method require pure delegation to the
wrapped field, simply override and use the provided getWrappedField method.
DecoratedDurationField is thread-safe and immutable, and its subclasses must
be as well.
author: Brian S O'Neill See Also: DelegatedDurationField since: 1.0 |
DecoratedDurationField | public DecoratedDurationField(DurationField field, DurationFieldType type)(Code) | | Constructor.
Parameters: field - the base field Parameters: type - the type to actually use |
add | public long add(long instant, int value)(Code) | | |
add | public long add(long instant, long value)(Code) | | |
getDifferenceAsLong | public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant)(Code) | | |
getMillis | public long getMillis(int value, long instant)(Code) | | |
getMillis | public long getMillis(long value, long instant)(Code) | | |
getUnitMillis | public long getUnitMillis()(Code) | | |
getValueAsLong | public long getValueAsLong(long duration, long instant)(Code) | | |
getWrappedField | final public DurationField getWrappedField()(Code) | | Gets the wrapped duration field.
the wrapped DurationField |
isPrecise | public boolean isPrecise()(Code) | | |
Methods inherited from org.joda.time.DurationField | abstract public long add(long instant, int value)(Code)(Java Doc) abstract public long add(long instant, long value)(Code)(Java Doc) abstract public int compareTo(Object durationField)(Code)(Java Doc) abstract public int getDifference(long minuendInstant, long subtrahendInstant)(Code)(Java Doc) abstract public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant)(Code)(Java Doc) abstract public long getMillis(int value)(Code)(Java Doc) abstract public long getMillis(long value)(Code)(Java Doc) abstract public long getMillis(int value, long instant)(Code)(Java Doc) abstract public long getMillis(long value, long instant)(Code)(Java Doc) abstract public String getName()(Code)(Java Doc) abstract public DurationFieldType getType()(Code)(Java Doc) abstract public long getUnitMillis()(Code)(Java Doc) abstract public int getValue(long duration)(Code)(Java Doc) abstract public int getValue(long duration, long instant)(Code)(Java Doc) abstract public long getValueAsLong(long duration)(Code)(Java Doc) abstract public long getValueAsLong(long duration, long instant)(Code)(Java Doc) abstract public boolean isPrecise()(Code)(Java Doc) abstract public boolean isSupported()(Code)(Java Doc) public long subtract(long instant, int value)(Code)(Java Doc) public long subtract(long instant, long value)(Code)(Java Doc) abstract public String toString()(Code)(Java Doc)
|
|
|