| java.lang.Object org.joda.time.DurationField org.joda.time.field.BaseDurationField org.joda.time.field.DecoratedDurationField org.joda.time.field.ScaledDurationField
ScaledDurationField | public class ScaledDurationField extends DecoratedDurationField (Code) | | Scales a DurationField such that it's unit millis becomes larger in
magnitude.
ScaledDurationField is thread-safe and immutable.
See Also: PreciseDurationField author: Brian S O'Neill since: 1.0 |
Method Summary | |
public long | add(long instant, int value) | public long | add(long instant, long value) | public boolean | equals(Object obj) Compares this duration field to another. | public int | getDifference(long minuendInstant, long subtrahendInstant) | public long | getDifferenceAsLong(long minuendInstant, long subtrahendInstant) | public long | getMillis(int value) | public long | getMillis(long value) | public long | getMillis(int value, long instant) | public long | getMillis(long value, long instant) | public int | getScalar() Returns the scalar applied, in the field's units. | public long | getUnitMillis() | public int | getValue(long duration) | public int | getValue(long duration, long instant) | public long | getValueAsLong(long duration) | public long | getValueAsLong(long duration, long instant) | public int | hashCode() Gets a hash code for this instance. |
ScaledDurationField | public ScaledDurationField(DurationField field, DurationFieldType type, int scalar)(Code) | | Constructor
Parameters: field - the field to wrap, like "year()". Parameters: type - the type this field will actually use Parameters: scalar - scalar, such as 100 years in a century throws: IllegalArgumentException - if scalar is zero or one. |
add | public long add(long instant, int value)(Code) | | |
add | public long add(long instant, long value)(Code) | | |
equals | public boolean equals(Object obj)(Code) | | Compares this duration field to another.
Two fields are equal if of the same type and duration.
Parameters: obj - the object to compare to if equal |
getDifference | public int getDifference(long minuendInstant, long subtrahendInstant)(Code) | | |
getDifferenceAsLong | public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant)(Code) | | |
getMillis | public long getMillis(int value)(Code) | | |
getMillis | public long getMillis(long value)(Code) | | |
getMillis | public long getMillis(int value, long instant)(Code) | | |
getMillis | public long getMillis(long value, long instant)(Code) | | |
getScalar | public int getScalar()(Code) | | Returns the scalar applied, in the field's units.
the scalar |
getUnitMillis | public long getUnitMillis()(Code) | | |
getValue | public int getValue(long duration)(Code) | | |
getValue | public int getValue(long duration, long instant)(Code) | | |
getValueAsLong | public long getValueAsLong(long duration)(Code) | | |
getValueAsLong | public long getValueAsLong(long duration, long instant)(Code) | | |
hashCode | public int hashCode()(Code) | | Gets a hash code for this instance.
a suitable hashcode |
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)
|
|
|