net.sourceforge.jeuclid.elements.support.attributes
Interface AttributeMap

All Known Implementing Classes:
AbstractAttributeMap, DOMAttributeMap, SAXAttributeMap

public interface AttributeMap

Generic interface to access XML attributes.

Version:
$Revision: 310 $
Author:
Max Berger

Method Summary
 Map<String,String> getAsMap()
          retrieve the attributes as map.
 boolean getBoolean(String attrName, boolean defaultValue)
          retrieve the value of the attribute as boolean.
 String getString(String attrName)
          retrieve the value of the attribute as String.
 String getString(String attrName, String defaultValue)
          retrieve the value of the attribute as String.
 boolean hasAttribute(String attrName)
          return true if an attribute is present.
 

Method Detail

hasAttribute

boolean hasAttribute(String attrName)
return true if an attribute is present.

Parameters:
attrName - name of the attribute to look for.
Returns:
true if attrName is present.

getString

String getString(String attrName)
retrieve the value of the attribute as String.

Parameters:
attrName - name of the attribute
Returns:
the value of the attribute as String.

getString

String getString(String attrName,
                 String defaultValue)
retrieve the value of the attribute as String.

Parameters:
attrName - name of the attribute
defaultValue - value to use if unset.
Returns:
the value of the attribute as String.

getBoolean

boolean getBoolean(String attrName,
                   boolean defaultValue)
retrieve the value of the attribute as boolean.

Parameters:
attrName - name of the attribute.
defaultValue - value to use if unset.
Returns:
a boolean value.

getAsMap

Map<String,String> getAsMap()
retrieve the attributes as map.

Returns:
a Map<String,String>


Copyright © 2002-2008 The JEuclid project. All Rights Reserved.