public final class

UnsupportedDateTimeField

extends DateTimeField
implements Serializable
java.lang.Object
   ↳ org.joda.time.DateTimeField
     ↳ org.joda.time.field.UnsupportedDateTimeField

Class Overview

A placeholder implementation to use when a datetime field is not supported.

UnsupportedDateTimeField is thread-safe and immutable.

Summary

Public Methods
int[] add(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)
Always throws UnsupportedOperationException
long add(long instant, long value)
Delegates to the duration field.
long add(long instant, int value)
Delegates to the duration field.
long addWrapField(long instant, int value)
Always throws UnsupportedOperationException
int[] addWrapField(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)
Always throws UnsupportedOperationException
int[] addWrapPartial(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)
Always throws UnsupportedOperationException
int get(long instant)
Always throws UnsupportedOperationException
String getAsShortText(ReadablePartial partial, int fieldValue, Locale locale)
Always throws UnsupportedOperationException
String getAsShortText(int fieldValue, Locale locale)
Always throws UnsupportedOperationException
String getAsShortText(ReadablePartial partial, Locale locale)
Always throws UnsupportedOperationException
String getAsShortText(long instant)
Always throws UnsupportedOperationException
String getAsShortText(long instant, Locale locale)
Always throws UnsupportedOperationException
String getAsText(ReadablePartial partial, Locale locale)
Always throws UnsupportedOperationException
String getAsText(int fieldValue, Locale locale)
Always throws UnsupportedOperationException
String getAsText(long instant, Locale locale)
Always throws UnsupportedOperationException
String getAsText(long instant)
Always throws UnsupportedOperationException
String getAsText(ReadablePartial partial, int fieldValue, Locale locale)
Always throws UnsupportedOperationException
int getDifference(long minuendInstant, long subtrahendInstant)
Delegates to the duration field.
long getDifferenceAsLong(long minuendInstant, long subtrahendInstant)
Delegates to the duration field.
DurationField getDurationField()
Even though this DateTimeField is unsupported, the duration field might be supported.
synchronized static UnsupportedDateTimeField getInstance(DateTimeFieldType type, DurationField durationField)
Gets an instance of UnsupportedDateTimeField for a specific named field.
int getLeapAmount(long instant)
Always throws UnsupportedOperationException
DurationField getLeapDurationField()
Always returns null.
int getMaximumShortTextLength(Locale locale)
Always throws UnsupportedOperationException
int getMaximumTextLength(Locale locale)
Always throws UnsupportedOperationException
int getMaximumValue(long instant)
Always throws UnsupportedOperationException
int getMaximumValue(ReadablePartial instant)
Always throws UnsupportedOperationException
int getMaximumValue()
Always throws UnsupportedOperationException
int getMaximumValue(ReadablePartial instant, int[] values)
Always throws UnsupportedOperationException
int getMinimumValue(ReadablePartial instant)
Always throws UnsupportedOperationException
int getMinimumValue(ReadablePartial instant, int[] values)
Always throws UnsupportedOperationException
int getMinimumValue(long instant)
Always throws UnsupportedOperationException
int getMinimumValue()
Always throws UnsupportedOperationException
String getName()
Get the name of the field.
DurationField getRangeDurationField()
Always returns null.
DateTimeFieldType getType()
Get the type of the field.
boolean isLeap(long instant)
Always throws UnsupportedOperationException
boolean isLenient()
This field is not lenient.
boolean isSupported()
This field is not supported.
long remainder(long instant)
Always throws UnsupportedOperationException
long roundCeiling(long instant)
Always throws UnsupportedOperationException
long roundFloor(long instant)
Always throws UnsupportedOperationException
long roundHalfCeiling(long instant)
Always throws UnsupportedOperationException
long roundHalfEven(long instant)
Always throws UnsupportedOperationException
long roundHalfFloor(long instant)
Always throws UnsupportedOperationException
long set(long instant, String text, Locale locale)
Always throws UnsupportedOperationException
int[] set(ReadablePartial instant, int fieldIndex, int[] values, int newValue)
Always throws UnsupportedOperationException
int[] set(ReadablePartial instant, int fieldIndex, int[] values, String text, Locale locale)
Always throws UnsupportedOperationException
long set(long instant, int value)
Always throws UnsupportedOperationException
long set(long instant, String text)
Always throws UnsupportedOperationException
String toString()
Get a suitable debug string.
[Expand]
Inherited Methods
From class org.joda.time.DateTimeField
From class java.lang.Object

Public Methods

public int[] add (ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)

Always throws UnsupportedOperationException

Parameters
instant the partial instant
fieldIndex the index of this field in the instant
values the values of the partial instant which should be updated
valueToAdd the value to add, in the units of the field
Returns
  • the passed in values

public long add (long instant, long value)

Delegates to the duration field.

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to add to
value the long value to add, in the units of the field
Returns
  • the updated milliseconds
Throws
UnsupportedOperationException if the duration is unsupported

public long add (long instant, int value)

Delegates to the duration field.

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to add to
value the value to add, in the units of the field
Returns
  • the updated milliseconds
Throws
UnsupportedOperationException if the duration is unsupported

public long addWrapField (long instant, int value)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to add to
value the value to add, in the units of the field
Returns
  • the updated milliseconds

public int[] addWrapField (ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)

Always throws UnsupportedOperationException

Parameters
instant the partial instant
fieldIndex the index of this field in the instant
values the values of the partial instant which should be updated
valueToAdd the value to add, in the units of the field
Returns
  • the passed in values

public int[] addWrapPartial (ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd)

Always throws UnsupportedOperationException

Parameters
instant the partial instant
fieldIndex the index of this field in the partial
values the values of the partial instant which should be updated
valueToAdd the value to add, in the units of the field
Returns
  • the passed in values

public int get (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
Returns
  • the value of the field, in the units of the field

public String getAsShortText (ReadablePartial partial, int fieldValue, Locale locale)

Always throws UnsupportedOperationException

Parameters
partial the partial instant to query
fieldValue the field value of this field, provided for performance
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsShortText (int fieldValue, Locale locale)

Always throws UnsupportedOperationException

Parameters
fieldValue the numeric value to convert to text
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsShortText (ReadablePartial partial, Locale locale)

Always throws UnsupportedOperationException

Parameters
partial the partial instant to query
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsShortText (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
Returns
  • the short text value of the field

public String getAsShortText (long instant, Locale locale)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
locale the locale to use for selecting a text symbol, null for default
Returns
  • the short text value of the field

public String getAsText (ReadablePartial partial, Locale locale)

Always throws UnsupportedOperationException

Parameters
partial the partial instant to query
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsText (int fieldValue, Locale locale)

Always throws UnsupportedOperationException

Parameters
fieldValue the numeric value to convert to text
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsText (long instant, Locale locale)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public String getAsText (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
Returns
  • the text value of the field

public String getAsText (ReadablePartial partial, int fieldValue, Locale locale)

Always throws UnsupportedOperationException

Parameters
partial the partial instant to query
fieldValue the field value of this field, provided for performance
locale the locale to use for selecting a text symbol, null for default
Returns
  • the text value of the field

public int getDifference (long minuendInstant, long subtrahendInstant)

Delegates to the duration field.

Parameters
minuendInstant the milliseconds from 1970-01-01T00:00:00Z to subtract from
subtrahendInstant the milliseconds from 1970-01-01T00:00:00Z to subtract off the minuend
Returns
  • the difference in the units of this field
Throws
UnsupportedOperationException if the duration is unsupported

public long getDifferenceAsLong (long minuendInstant, long subtrahendInstant)

Delegates to the duration field.

Parameters
minuendInstant the milliseconds from 1970-01-01T00:00:00Z to subtract from
subtrahendInstant the milliseconds from 1970-01-01T00:00:00Z to subtract off the minuend
Returns
  • the difference in the units of this field
Throws
UnsupportedOperationException if the duration is unsupported

public DurationField getDurationField ()

Even though this DateTimeField is unsupported, the duration field might be supported.

Returns
  • a possibly supported DurationField

public static synchronized UnsupportedDateTimeField getInstance (DateTimeFieldType type, DurationField durationField)

Gets an instance of UnsupportedDateTimeField for a specific named field. Names should be of standard format, such as 'monthOfYear' or 'hourOfDay'. The returned instance is cached.

Parameters
type the type to obtain
Returns
  • the instance
Throws
IllegalArgumentException if durationField is null

public int getLeapAmount (long instant)

Always throws UnsupportedOperationException

Parameters
instant the instant to check for leap status
Returns
  • the amount, in units of the leap duration field, that the field is leap

public DurationField getLeapDurationField ()

Always returns null.

Returns
  • null always

public int getMaximumShortTextLength (Locale locale)

Always throws UnsupportedOperationException

Parameters
locale the locale to use for selecting a text symbol
Returns
  • the maximum short text length

public int getMaximumTextLength (Locale locale)

Always throws UnsupportedOperationException

Parameters
locale the locale to use for selecting a text symbol
Returns
  • the maximum text length

public int getMaximumValue (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
Returns
  • the maximum value for this field, in the units of the field

public int getMaximumValue (ReadablePartial instant)

Always throws UnsupportedOperationException

Parameters
instant the partial instant to query
Returns
  • the maximum value for this field, in the units of the field

public int getMaximumValue ()

Always throws UnsupportedOperationException

Returns
  • the maximum valid value for this field, in the units of the field

public int getMaximumValue (ReadablePartial instant, int[] values)

Always throws UnsupportedOperationException

Parameters
instant the partial instant to query
values the values to use
Returns
  • the maximum value for this field, in the units of the field

public int getMinimumValue (ReadablePartial instant)

Always throws UnsupportedOperationException

Parameters
instant the partial instant to query
Returns
  • the minimum value for this field, in the units of the field

public int getMinimumValue (ReadablePartial instant, int[] values)

Always throws UnsupportedOperationException

Parameters
instant the partial instant to query
values the values to use
Returns
  • the minimum value for this field, in the units of the field

public int getMinimumValue (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to query
Returns
  • the minimum value for this field, in the units of the field

public int getMinimumValue ()

Always throws UnsupportedOperationException

Returns
  • the minimum valid value for this field, in the units of the field

public String getName ()

Get the name of the field.

By convention, names follow a pattern of "dddOfRrr", where "ddd" represents the (singular) duration unit field name and "Rrr" represents the (singular) duration range field name. If the range field is not applicable, then the name of the field is simply the (singular) duration field name.

Returns
  • field name

public DurationField getRangeDurationField ()

Always returns null.

Returns
  • null always

public DateTimeFieldType getType ()

Get the type of the field.

Returns
  • field type

public boolean isLeap (long instant)

Always throws UnsupportedOperationException

Parameters
instant the instant to check for leap status
Returns
  • true if the field is 'leap'

public boolean isLenient ()

This field is not lenient.

Returns
  • false always

public boolean isSupported ()

This field is not supported.

Returns
  • false always

public long remainder (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to get the remainder
Returns
  • remainder duration, in milliseconds

public long roundCeiling (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to round
Returns
  • rounded milliseconds

public long roundFloor (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to round
Returns
  • rounded milliseconds

public long roundHalfCeiling (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to round
Returns
  • rounded milliseconds

public long roundHalfEven (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to round
Returns
  • rounded milliseconds

public long roundHalfFloor (long instant)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to round
Returns
  • rounded milliseconds

public long set (long instant, String text, Locale locale)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to set in
text the text value to set
locale the locale to use for selecting a text symbol, null for default
Returns
  • the updated milliseconds

public int[] set (ReadablePartial instant, int fieldIndex, int[] values, int newValue)

Always throws UnsupportedOperationException

Parameters
instant the partial instant
fieldIndex the index of this field in the instant
values the values of the partial instant which should be updated
newValue the value to set, in the units of the field
Returns
  • the passed in values

public int[] set (ReadablePartial instant, int fieldIndex, int[] values, String text, Locale locale)

Always throws UnsupportedOperationException

Parameters
instant the partial instant
fieldIndex the index of this field in the instant
values the values of the partial instant which should be updated
text the text value to set
locale the locale to use for selecting a text symbol, null for default
Returns
  • the passed in values

public long set (long instant, int value)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to set in
value the value to set, in the units of the field
Returns
  • the updated milliseconds

public long set (long instant, String text)

Always throws UnsupportedOperationException

Parameters
instant the milliseconds from 1970-01-01T00:00:00Z to set in
text the text value to set
Returns
  • the updated milliseconds

public String toString ()

Get a suitable debug string.

Returns
  • debug string