org.inria.ns.reflex.structures
Interface Configurable

All Known Subinterfaces:
Serializer
All Known Implementing Classes:
BatikSerializer, Configurable.Impl, FOPSerializer, PageSerializer, ParserConfiguration.Impl, PDFSerializer, ProcessorInstance, PSSerializer, ReflexCLI, SwitchSerializer, Tokenizer

public interface Configurable

A common structure for classes that need to manage a set of attributes.

Author:
Philippe Poulard

Nested Class Summary
static class Configurable.Impl
          A base implementation backed by a Map.
 
Method Summary
 boolean containsAttribute(Object key)
          Returns true if the attributes set contains a mapping for the specified key.
 Object getAttribute(Object key)
          Returns an attribute that has been defined for the processor.
 Map getAttributes()
          Returns the set of attributes defined.
 void mergeAttributes(Map attributes)
          Merges 2 collections.
 void setAttribute(Object key, Object data)
          Defines an attribute.
 void setAttributes(Map attributes)
          Defines an attributes set.
 

Method Detail

setAttribute

void setAttribute(Object key,
                  Object data)
Defines an attribute.

Parameters:
key - The key associated to the object.
data - The object to define as an attribute.

setAttributes

void setAttributes(Map attributes)
Defines an attributes set.

Parameters:
attributes - The attributes set to define.

getAttribute

Object getAttribute(Object key)
Returns an attribute that has been defined for the processor. If none correspond to the key, null is returned.

Parameters:
key - The key associated to the object.
Returns:
The object defined as an attribute.

getAttributes

Map getAttributes()
Returns the set of attributes defined.

Returns:
The set of attributes defined.

containsAttribute

boolean containsAttribute(Object key)
Returns true if the attributes set contains a mapping for the specified key.

Parameters:
key - The key associated to the object.
Returns:
true if the attributes set contains a mapping for the specified key.

mergeAttributes

void mergeAttributes(Map attributes)
Merges 2 collections.

Parameters:
attributes - The attributes set to merge with.