Package net.time4j.engine
Interface AttributeQuery
- All Known Implementing Classes:
Attributes
public interface AttributeQuery
Type-safe query for format attributes which control the formatting process.
- Author:
- Meno Hochschild
- See Also:
ChronoMerger.createFrom(ChronoEntity, AttributeQuery, boolean, boolean)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains(AttributeKey<?> key)
Queries if a format attribute exists for given key.<A> A
get(AttributeKey<A> key)
Yields a format attribute for given key.<A> A
get(AttributeKey<A> key, A defaultValue)
Yields a format attribute for given key.
-
Method Details
-
contains
Queries if a format attribute exists for given key.
- Parameters:
key
- attribute key- Returns:
true
if attribute exists elsefalse
-
get
Yields a format attribute for given key.
- Type Parameters:
A
- generic type of attribute value- Parameters:
key
- attribute key- Returns:
- attribute value
- Throws:
NoSuchElementException
- if attribute does not exist
-
get
Yields a format attribute for given key.
- Type Parameters:
A
- generic type of attribute value- Parameters:
key
- attribute keydefaultValue
- replacement value to be used if attribute does not exist- Returns:
- attribute value
-