|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Calendrical
Provides access in a uniform way to calendrical values.
All classes that can provide calendrical information should implement this interface.
The single method allows a calendrical to be queried to find the value of a rule.
A calendrical might be a single field, such as month-of-year or hour-of-day, or a
whole object, such as LocalDate
or ZoneOffset
.
This interface makes no guarantees about the thread-safety or immutability of implementations.
Method Summary | ||
---|---|---|
|
get(CalendricalRule<T> rule)
Gets the value of the specified calendrical rule. |
Method Detail |
---|
<T> T get(CalendricalRule<T> rule)
This method queries the value of the specified rule.
If the rule is not supported then null
will be returned.
Where this method returns numeric values, Integer is the preferred type. The values should be within the range of the field wherever possible. For example, minute-of-hour should be from 0 to 59 inclusive. The calling code must validate the value however and not trust it to be valid.
The standard implementation of this method calls one of the static derive
methods on CalendricalEngine
.
Implementations must ensure that calls to this method are thread-safe. An immutable implementation will naturally provide this guarantee.
rule
- the rule to query, not null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |