org.joda.time
Class IllegalFieldValueException
IllegalArgumentException
org.joda.time.IllegalFieldValueException
public class IllegalFieldValueException
extends IllegalArgumentException
Exception thrown when attempting to set a field outside its supported range.
IllegalFieldValueException(String fieldName, Number value, Number lowerBound, Number upperBound) - Constructor.
|
IllegalFieldValueException(String fieldName, String value) - Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType, Number value, Number lowerBound, Number upperBound) - Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType, Number value, String explain) - Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType, String value) - Constructor.
|
IllegalFieldValueException(DurationFieldType fieldType, Number value, Number lowerBound, Number upperBound) - Constructor.
|
IllegalFieldValueException(DurationFieldType fieldType, String value) - Constructor.
|
IllegalFieldValueException
public IllegalFieldValueException(String fieldName,
Number value,
Number lowerBound,
Number upperBound)
Constructor.
fieldName
- name of field being setvalue
- illegal value being setlowerBound
- lower legal field value, or null if not applicableupperBound
- upper legal field value, or null if not applicable
IllegalFieldValueException
public IllegalFieldValueException(String fieldName,
String value)
Constructor.
fieldName
- name of field being setvalue
- illegal value being set
IllegalFieldValueException
public IllegalFieldValueException(DateTimeFieldType fieldType,
Number value,
Number lowerBound,
Number upperBound)
Constructor.
fieldType
- type of field being setvalue
- illegal value being setlowerBound
- lower legal field value, or null if not applicableupperBound
- upper legal field value, or null if not applicable
IllegalFieldValueException
public IllegalFieldValueException(DateTimeFieldType fieldType,
Number value,
String explain)
Constructor.
fieldType
- type of field being setvalue
- illegal value being setexplain
- an explanation
IllegalFieldValueException
public IllegalFieldValueException(DateTimeFieldType fieldType,
String value)
Constructor.
fieldType
- type of field being setvalue
- illegal value being set
IllegalFieldValueException
public IllegalFieldValueException(DurationFieldType fieldType,
Number value,
Number lowerBound,
Number upperBound)
Constructor.
fieldType
- type of field being setvalue
- illegal value being setlowerBound
- lower legal field value, or null if not applicableupperBound
- upper legal field value, or null if not applicable
IllegalFieldValueException
public IllegalFieldValueException(DurationFieldType fieldType,
String value)
Constructor.
fieldType
- type of field being setvalue
- illegal value being set
getDateTimeFieldType
public DateTimeFieldType getDateTimeFieldType()
Returns the DateTimeFieldType whose value was invalid, or null if not applicable.
getDurationFieldType
public DurationFieldType getDurationFieldType()
Returns the DurationFieldType whose value was invalid, or null if not applicable.
getFieldName
public String getFieldName()
Returns the name of the field whose value was invalid.
getIllegalNumberValue
public Number getIllegalNumberValue()
Returns the illegal integer value assigned to the field, or null if not applicable.
getIllegalStringValue
public String getIllegalStringValue()
Returns the illegal string value assigned to the field, or null if not applicable.
getIllegalValueAsString
public String getIllegalValueAsString()
Returns the illegal value assigned to the field as a non-null string.
getLowerBound
public Number getLowerBound()
Returns the lower bound of the legal value range, or null if not applicable.
getMessage
public String getMessage()
getUpperBound
public Number getUpperBound()
Returns the upper bound of the legal value range, or null if not applicable.
prependMessage
public void prependMessage(String message)
Provide additional detail by prepending a message to the existing message.
A colon is separator is automatically inserted between the messages.
Copyright (c) 2001-2006 - Joda.org