Package net.time4j.format.expert
Interface ChronoPrinter<T>
- Type Parameters:
- T- generic type of chronological entity to be formatted
- All Known Implementing Classes:
- ChronoFormatter
public interface ChronoPrinter<T>
Prints a chronological entity.
- Since:
- 3.0
- Author:
- Meno Hochschild
- See Also:
- ChronoEntity
- 
Method SummaryModifier and TypeMethodDescriptiondefault AttributeQueryReturns the global format attributes which are active if they are not overridden by sectional attributes.default StringPrints given chronological entity as formatted text.default Set<ElementPosition>print(T formattable, StringBuilder buffer)Prints given chronological entity as formatted text and writes the text into given buffer.print(T formattable, StringBuilder buffer, AttributeQuery attributes)Prints given chronological entity as formatted text and writes the text into given buffer.
- 
Method Details- 
printPrints given chronological entity as formatted text. - Parameters:
- formattable- object to be formatted
- Returns:
- formatted text
- Throws:
- IllegalArgumentException- if given object is not formattable
- Since:
- 5.0
 
- 
printPrints given chronological entity as formatted text and writes the text into given buffer. Equivalent to print(formattable, buffer, getAttributes()).- Parameters:
- formattable- object to be formatted
- buffer- text output buffer
- Returns:
- unmodifiable set of element positions in formatted text, maybe empty
- Throws:
- IllegalArgumentException- if given object is not formattable
- Since:
- 4.18
 
- 
printPrints given chronological entity as formatted text and writes the text into given buffer. - Parameters:
- formattable- object to be formatted
- buffer- text output buffer
- attributes- format attributes which can control formatting
- Returns:
- unmodifiable set of element positions in formatted text, maybe empty
- Throws:
- IllegalArgumentException- if given object is not formattable
- Since:
- 4.18
 
- 
getAttributesReturns the global format attributes which are active if they are not overridden by sectional attributes. - Returns:
- global control attributes valid for the whole formatter (can be overridden by sectional attributes however)
- Since:
- 4.18
 
 
-