diva.pod.lwgraph
Class BasicLWNode

java.lang.Object
  extended by diva.pod.lwgraph.BasicLWNode
All Implemented Interfaces:
LWNode, PropertyContainer

public class BasicLWNode
extends Object
implements LWNode, PropertyContainer

A basic implementation of the light-weight node interface. This class implements a node that contains a set of attributes.

Version:
$Revision: 1.2 $
Author:
John Reekie

Constructor Summary
BasicLWNode()
          Create a new node
 
Method Summary
 int getNodeId()
          Return the integer id of this node
 Object getProperty(String key)
          Return the property corresponding to the given key, or null if no such property exists.
 Iterator propertyNames()
          Return an iteration of the names of the properties
 void setNodeId(int id)
          Set the integer id of this node.
 void setProperty(String key, Object value)
          Set the property corresponding to the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicLWNode

public BasicLWNode()
Create a new node

Method Detail

getNodeId

public int getNodeId()
Return the integer id of this node

Specified by:
getNodeId in interface LWNode

getProperty

public Object getProperty(String key)
Return the property corresponding to the given key, or null if no such property exists.

Specified by:
getProperty in interface PropertyContainer

setNodeId

public void setNodeId(int id)
Set the integer id of this node.

Specified by:
setNodeId in interface LWNode

propertyNames

public Iterator propertyNames()
Return an iteration of the names of the properties

Specified by:
propertyNames in interface PropertyContainer

setProperty

public void setProperty(String key,
                        Object value)
Set the property corresponding to the given key.

Specified by:
setProperty in interface PropertyContainer


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.