Joda System API

org.joda.property.impl
Class AbstractModelElement

java.lang.Object
  |
  +--org.joda.property.impl.AbstractModelElement
All Implemented Interfaces:
ModelElement, java.io.Serializable
Direct Known Subclasses:
AbstractBean, AbstractProperty, AbstractProxyBean

public abstract class AbstractModelElement
extends java.lang.Object
implements ModelElement

Abstract ModelElement provides the implementation of the attributes common to Beans and Properties

Author:
Stephen Colebourne
See Also:
Serialized Form

Constructor Summary
AbstractModelElement()
          Constructor.
 
Method Summary
 java.lang.String getAttribute(java.lang.String key)
          Get an attribute by key.
 int getAttributeCount()
          Get the count of attributes.
 java.util.Map getAttributeMap()
          Get the Map of string to string attributes.
 void setAttribute(java.lang.String key, java.lang.String value)
          Set an attribute key and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModelElement

public AbstractModelElement()
Constructor.

Method Detail

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Description copied from interface: ModelElement
Get an attribute by key.

Specified by:
getAttribute in interface ModelElement
Parameters:
key - the key to get
Returns:
attribute value by key, null if not found
See Also:
ModelElement.getAttribute(String)

getAttributeCount

public int getAttributeCount()
Description copied from interface: ModelElement
Get the count of attributes. This should be checked rather than getAttributes().size() to allow for lazily instantiated attribute maps.

Specified by:
getAttributeCount in interface ModelElement
Returns:
the number of attributes
See Also:
ModelElement.getAttributeCount()

getAttributeMap

public java.util.Map getAttributeMap()
Description copied from interface: ModelElement
Get the Map of string to string attributes.

Specified by:
getAttributeMap in interface ModelElement
Returns:
string/string attribute Map
See Also:
ModelElement.getAttributeMap()

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Description copied from interface: ModelElement
Set an attribute key and value.

Specified by:
setAttribute in interface ModelElement
Parameters:
key - the key to set
value - the value to set
See Also:
ModelElement.setAttribute(String, String)

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.