GraphLab Project

graphlab.platform.attribute
Class NotifiableAttributeSetImpl

java.lang.Object
  extended by graphlab.platform.attribute.AttributeSetImpl
      extended by graphlab.platform.attribute.NotifiableAttributeSetImpl
All Implemented Interfaces:
AttributeSet, NotifiableAttributeSet

public class NotifiableAttributeSetImpl
extends AttributeSetImpl
implements NotifiableAttributeSet

Default implementation for the NotifiableAttributeSet

Author:
Azin Azadi, Reza Mohammadi, Rouzbeh Ebrahimi
See Also:
NotifiableAttributeSet

Field Summary
 
Fields inherited from class graphlab.platform.attribute.AttributeSetImpl
atr
 
Constructor Summary
NotifiableAttributeSetImpl()
           
 
Method Summary
 void addAttributeListener(AttributeListener attributeListener)
          Add a listener to changes of an AttributeSet.
 void fireAttributeChange(java.util.Collection<AttributeListener> listeners, java.lang.String name, java.lang.Object oldVal, java.lang.Object newVal)
           
 java.lang.Object get(java.lang.String name)
           
 java.util.Collection<AttributeListener> getAttributeListeners()
           
 void put(java.lang.String name, java.lang.Object value)
           
 void removeAttributeListener(AttributeListener x)
          Remove a listener from list of listeners.
 
Methods inherited from class graphlab.platform.attribute.AttributeSetImpl
clear, contains, getAttrs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface graphlab.platform.attribute.AttributeSet
getAttrs
 

Constructor Detail

NotifiableAttributeSetImpl

public NotifiableAttributeSetImpl()
Method Detail

put

public void put(java.lang.String name,
                java.lang.Object value)
Specified by:
put in interface AttributeSet
Overrides:
put in class AttributeSetImpl

get

public java.lang.Object get(java.lang.String name)
Specified by:
get in interface AttributeSet
Overrides:
get in class AttributeSetImpl

addAttributeListener

public void addAttributeListener(AttributeListener attributeListener)
Description copied from interface: NotifiableAttributeSet
Add a listener to changes of an AttributeSet.
It's better to use a List because of getAttributeListeners() method.

Specified by:
addAttributeListener in interface NotifiableAttributeSet
Parameters:
attributeListener - the listener!

getAttributeListeners

public java.util.Collection<AttributeListener> getAttributeListeners()
Specified by:
getAttributeListeners in interface NotifiableAttributeSet
Returns:
List of listeners

removeAttributeListener

public void removeAttributeListener(AttributeListener x)
Description copied from interface: NotifiableAttributeSet
Remove a listener from list of listeners.

Specified by:
removeAttributeListener in interface NotifiableAttributeSet

fireAttributeChange

public void fireAttributeChange(java.util.Collection<AttributeListener> listeners,
                                java.lang.String name,
                                java.lang.Object oldVal,
                                java.lang.Object newVal)

GraphLab Project