public final class UnsupportedDurationField extends DurationField implements java.io.Serializable
UnsupportedDurationField is thread-safe and immutable.
| Modifier and Type | Method and Description |
|---|---|
long |
add(long instant,
int value)
Always throws UnsupportedOperationException
|
long |
add(long instant,
long value)
Always throws UnsupportedOperationException
|
int |
compareTo(DurationField durationField)
Always returns zero, indicating that sort order is not relevent.
|
boolean |
equals(java.lang.Object obj)
Compares this duration field to another.
|
int |
getDifference(long minuendInstant,
long subtrahendInstant)
Always throws UnsupportedOperationException
|
long |
getDifferenceAsLong(long minuendInstant,
long subtrahendInstant)
Always throws UnsupportedOperationException
|
static UnsupportedDurationField |
getInstance(DurationFieldType type)
Gets an instance of UnsupportedDurationField for a specific named field.
|
long |
getMillis(int value)
Always throws UnsupportedOperationException
|
long |
getMillis(int value,
long instant)
Always throws UnsupportedOperationException
|
long |
getMillis(long value)
Always throws UnsupportedOperationException
|
long |
getMillis(long value,
long instant)
Always throws UnsupportedOperationException
|
java.lang.String |
getName()
Get the name of the field.
|
DurationFieldType |
getType()
Get the type of the field.
|
long |
getUnitMillis()
Always returns zero.
|
int |
getValue(long duration)
Always throws UnsupportedOperationException
|
int |
getValue(long duration,
long instant)
Always throws UnsupportedOperationException
|
long |
getValueAsLong(long duration)
Always throws UnsupportedOperationException
|
long |
getValueAsLong(long duration,
long instant)
Always throws UnsupportedOperationException
|
int |
hashCode()
Gets a suitable hashcode.
|
boolean |
isPrecise()
This field is precise.
|
boolean |
isSupported()
This field is not supported.
|
java.lang.String |
toString()
Get a suitable debug string.
|
subtract, subtractpublic static UnsupportedDurationField getInstance(DurationFieldType type)
type - the type to obtainpublic final DurationFieldType getType()
DurationFieldgetType in class DurationFieldpublic java.lang.String getName()
DurationFieldBy convention, names are plural.
getName in class DurationFieldpublic boolean isSupported()
isSupported in class DurationFieldpublic boolean isPrecise()
isPrecise in class DurationFieldDurationField.getUnitMillis()public int getValue(long duration)
getValue in class DurationFieldduration - the milliseconds to query, which may be negativejava.lang.UnsupportedOperationExceptionpublic long getValueAsLong(long duration)
getValueAsLong in class DurationFieldduration - the milliseconds to query, which may be negativejava.lang.UnsupportedOperationExceptionpublic int getValue(long duration,
long instant)
getValue in class DurationFieldduration - the milliseconds to query, which may be negativeinstant - the start instant to calculate relative tojava.lang.UnsupportedOperationExceptionpublic long getValueAsLong(long duration,
long instant)
getValueAsLong in class DurationFieldduration - the milliseconds to query, which may be negativeinstant - the start instant to calculate relative tojava.lang.UnsupportedOperationExceptionpublic long getMillis(int value)
getMillis in class DurationFieldvalue - the value of the field, which may be negativejava.lang.UnsupportedOperationExceptionpublic long getMillis(long value)
getMillis in class DurationFieldvalue - the value of the field, which may be negativejava.lang.UnsupportedOperationExceptionpublic long getMillis(int value,
long instant)
getMillis in class DurationFieldvalue - the value of the field, which may be negativeinstant - the instant to calculate relative tojava.lang.UnsupportedOperationExceptionpublic long getMillis(long value,
long instant)
getMillis in class DurationFieldvalue - the value of the field, which may be negativeinstant - the instant to calculate relative tojava.lang.UnsupportedOperationExceptionpublic long add(long instant,
int value)
add in class DurationFieldinstant - the milliseconds from 1970-01-01T00:00:00Z to add tovalue - the value to add, in the units of the fieldjava.lang.UnsupportedOperationExceptionpublic long add(long instant,
long value)
add in class DurationFieldinstant - the milliseconds from 1970-01-01T00:00:00Z to add tovalue - the value to add, in the units of the fieldjava.lang.UnsupportedOperationExceptionpublic int getDifference(long minuendInstant,
long subtrahendInstant)
getDifference in class DurationFieldminuendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract fromsubtrahendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract off the minuendjava.lang.UnsupportedOperationExceptionpublic long getDifferenceAsLong(long minuendInstant,
long subtrahendInstant)
getDifferenceAsLong in class DurationFieldminuendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract fromsubtrahendInstant - the milliseconds from 1970-01-01T00:00:00Z to
subtract off the minuendjava.lang.UnsupportedOperationExceptionpublic long getUnitMillis()
getUnitMillis in class DurationFieldDurationField.isPrecise()public int compareTo(DurationField durationField)
compareTo in interface java.lang.Comparable<DurationField>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare topublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class DurationFieldCopyright © 2010 - 2023 Adobe. All Rights Reserved