net.ggtools.grand.graph
Class AttributeManager

java.lang.Object
  extended by net.ggtools.grand.graph.AttributeManager
All Implemented Interfaces:
GraphObject
Direct Known Subclasses:
LinkImpl, NodeImpl

abstract class AttributeManager
extends java.lang.Object
implements GraphObject

Abstract class to manage GraphObjet's attributes.

Author:
Christophe Labouisse

Field Summary
 
Fields inherited from interface net.ggtools.grand.graph.GraphObject
ATTR_ALL, ATTR_NONE
 
Constructor Summary
AttributeManager()
           
 
Method Summary
 void clearAttributes(int attributeMask)
          Sets one or more attributes of the object.
 int getAttributes()
          Returns a bitmask of all set attributes.
 boolean hasAttributes(int attributeMask)
          Returns true if all the attributes specified by the bit mask are set.
 void setAttributes(int attributeMask)
          Sets one or more attributes of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.ggtools.grand.graph.GraphObject
getGraph, getName
 

Constructor Detail

AttributeManager

AttributeManager()
Method Detail

setAttributes

public void setAttributes(int attributeMask)
Description copied from interface: GraphObject
Sets one or more attributes of the object. Multiple attributes should be combined by oring individual attributes: setAttributes(ATTR_ONE | ATTR_TWO);

Specified by:
setAttributes in interface GraphObject
Parameters:
attributeMask - a bit mask of attributes to set.

getAttributes

public int getAttributes()
Description copied from interface: GraphObject
Returns a bitmask of all set attributes.

Specified by:
getAttributes in interface GraphObject
Returns:
object's attributes.

clearAttributes

public void clearAttributes(int attributeMask)
Description copied from interface: GraphObject
Sets one or more attributes of the object. Multiple attributes should be combined by oring individual attributes: clearAttributes(ATTR_ONE | ATTR_TWO);

Specified by:
clearAttributes in interface GraphObject
Parameters:
attributeMask - a bit mask of attributes to clean.

hasAttributes

public boolean hasAttributes(int attributeMask)
Description copied from interface: GraphObject
Returns true if all the attributes specified by the bit mask are set.

Specified by:
hasAttributes in interface GraphObject
Parameters:
attributeMask - a bit mask of attributes to test.
Returns:
true if all attributes are set.


Copyright © 2004-2005 ggTools. All Rights Reserved.