intarsys runtime library

de.intarsys.tools.attribute
Class AttributeTools

java.lang.Object
  extended by de.intarsys.tools.attribute.AttributeTools

public class AttributeTools
extends Object

Tool class for handling generic attributes.


Constructor Summary
AttributeTools()
           
 
Method Summary
static Object getAttribute(Object object, Object key)
          Get an attribute value from object
static Object getAttributeBasic(Object object, Object key)
          Get an attribute value from object
static Object removeAttribute(Object object, Object key)
          Remove an attribute binding from object
static Object removeAttributeBasic(Object object, Object key)
          Remove an attribute binding from object
static Object setAttribute(Object object, Object key, Object value)
          Set the value of an attribute in object
static Object setAttributeBasic(Object object, Object key, Object value)
          Set the value of an attribute in object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeTools

public AttributeTools()
Method Detail

getAttribute

public static Object getAttribute(Object object,
                                  Object key)
Get an attribute value from object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to get
Returns:
The value of the attribute key

getAttributeBasic

public static Object getAttributeBasic(Object object,
                                       Object key)
Get an attribute value from object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to get
Returns:
The value of the attribute key

removeAttribute

public static Object removeAttribute(Object object,
                                     Object key)
Remove an attribute binding from object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to remove
Returns:
The previously associated value for key

removeAttributeBasic

public static Object removeAttributeBasic(Object object,
                                          Object key)
Remove an attribute binding from object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to remove
Returns:
The previously associated value for key

setAttribute

public static Object setAttribute(Object object,
                                  Object key,
                                  Object value)
Set the value of an attribute in object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to set
value - the new value the attribute
Returns:
The previously associated value for key

setAttributeBasic

public static Object setAttributeBasic(Object object,
                                       Object key,
                                       Object value)
Set the value of an attribute in object

Parameters:
object - The target object hosting the attribute
key - the name of the attribute to set
value - the new value the attribute
Returns:
The previously associated value for key

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.