Interface SinkEventAttributes

All Superinterfaces:
AttributeSet, MutableAttributeSet
All Known Implementing Classes:
SinkEventAttributeSet

public interface SinkEventAttributes extends MutableAttributeSet
A set of attributes for a sink event.

All sink methods that produce some presentation-level output should have at least one form that allows to pass in a Set of SinkEventAttributes. For instance in

void text(String text, SinkEventAttributes attributes);

the attributes parameter can be used to specify some text styling options, or other optional parameters.

What kind of attributes are supported depends on the event and the sink implementation. The sink API just specifies a list of suggested attribute names, that sinks are expected to recognize, and parsers are expected to use preferably when emitting events.

It is recommended that for simple attributes, both keys and values should be lower-case Strings, but this is not mandatory. One example of an exception is the STYLE attribute, whose value may itself be an AttributeSet again.

The base attributes that are supported by almost all events are CLASS, ID, LANG, STYLE and TITLE.

Since:
1.1
Author:
ltheussl
  • Field Details

  • Method Details

    • entrySet

      Returns a Set view of the attributes in form of Map.Entry items. The set is backed by the underlying map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
      Returns:
      a set view of the attributes
      Since:
      2.1.0