java.lang.Object | |
↳ | org.joda.time.field.FieldUtils |
General utilities that don't fit elsewhere.
FieldUtils is thread-safe and immutable.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares two objects as equals handling null.
| |||||||||||
Utility method used by addWrapField implementations to ensure the new
value lies within the field's legal value range.
| |||||||||||
Utility method that ensures the given value lies within the field's
legal value range.
| |||||||||||
Add two values throwing an exception if overflow occurs.
| |||||||||||
Add two values throwing an exception if overflow occurs.
| |||||||||||
Multiply two values throwing an exception if overflow occurs.
| |||||||||||
Multiply two values throwing an exception if overflow occurs.
| |||||||||||
Multiply two values throwing an exception if overflow occurs.
| |||||||||||
Multiply two values to return an int throwing an exception if overflow occurs.
| |||||||||||
Negates the input throwing an exception if it can't negate it.
| |||||||||||
Subtracts two values throwing an exception if overflow occurs.
| |||||||||||
Casts to an int throwing an exception if overflow occurs.
| |||||||||||
Verify that input values are within specified bounds.
| |||||||||||
Verify that input values are within specified bounds.
| |||||||||||
Verify that input values are within specified bounds.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Compares two objects as equals handling null.
object1 | the first object |
---|---|
object2 | the second object |
Utility method used by addWrapField implementations to ensure the new value lies within the field's legal value range.
currentValue | the current value of the data, which may lie outside the wrapped value range |
---|---|
wrapValue | the value to add to current value before wrapping. This may be negative. |
minValue | the wrap range minimum value. |
maxValue | the wrap range maximum value. This must be greater than minValue (checked by the method). |
IllegalArgumentException | if minValue is greater than or equal to maxValue |
---|
Utility method that ensures the given value lies within the field's legal value range.
value | the value to fit into the wrapped value range |
---|---|
minValue | the wrap range minimum value. |
maxValue | the wrap range maximum value. This must be greater than minValue (checked by the method). |
IllegalArgumentException | if minValue is greater than or equal to maxValue |
---|
Add two values throwing an exception if overflow occurs.
val1 | the first value |
---|---|
val2 | the second value |
ArithmeticException | if the value is too big or too small |
---|
Add two values throwing an exception if overflow occurs.
val1 | the first value |
---|---|
val2 | the second value |
ArithmeticException | if the value is too big or too small |
---|
Multiply two values throwing an exception if overflow occurs.
val1 | the first value |
---|---|
val2 | the second value |
ArithmeticException | if the value is too big or too small |
---|
Multiply two values throwing an exception if overflow occurs.
val1 | the first value |
---|---|
val2 | the second value |
ArithmeticException | if the value is too big or too small |
---|
Multiply two values throwing an exception if overflow occurs.
val1 | the first value |
---|---|
scalar | the second value |
ArithmeticException | if the value is too big or too small |
---|
Multiply two values to return an int throwing an exception if overflow occurs.
val1 | the first value |
---|---|
val2 | the second value |
ArithmeticException | if the value is too big or too small |
---|
Negates the input throwing an exception if it can't negate it.
value | the value to negate |
---|
ArithmeticException | if the value is Integer.MIN_VALUE |
---|
Subtracts two values throwing an exception if overflow occurs.
val1 | the first value, to be taken away from |
---|---|
val2 | the second value, the amount to take away |
ArithmeticException | if the value is too big or too small |
---|
Casts to an int throwing an exception if overflow occurs.
value | the value |
---|
ArithmeticException | if the value is too big or too small |
---|
Verify that input values are within specified bounds.
value | the value to check |
---|---|
lowerBound | the lower bound allowed for value |
upperBound | the upper bound allowed for value |
IllegalFieldValueException | if value is not in the specified bounds |
---|
Verify that input values are within specified bounds.
value | the value to check |
---|---|
lowerBound | the lower bound allowed for value |
upperBound | the upper bound allowed for value |
IllegalFieldValueException | if value is not in the specified bounds |
---|
Verify that input values are within specified bounds.
value | the value to check |
---|---|
lowerBound | the lower bound allowed for value |
upperBound | the upper bound allowed for value |
IllegalFieldValueException | if value is not in the specified bounds |
---|