mwalk Platform 0.3.0

mwalk.core
Class Link

java.lang.Object
  |
  +--mwalk.core.Link

public class Link
extends java.lang.Object
implements java.io.Serializable

A class representing a link between a parent and a child node.

Version:
1.0
Author:
Robert Chalmers
See Also:
Serialized Form

Field Summary
 boolean active
          Flag indicating time-independent link activity
 PeriodTable activity
          Table of active periods for this link
 java.util.Hashtable data
          Storage available to visitors to store partial results
 TreeNode node
          Child node on other end of link
 boolean primary
          Flag indicating primary links
(package private) static long serialVersionUID
          Serial version ID
 
Constructor Summary
Link(TreeNode node)
          Constructor.
 
Method Summary
 long activate(long time, long next)
          Mark the link as active for a duration between two timestamps.
 void clearData()
          Clear activity table and stored data.
 long deactivate(long time)
          Mark the link as inactive starting at the passed timestamp.
 boolean isActive()
          Check whether link is explicitly marked active.
 boolean isActive(long time)
          Check whether the link is active for a given timestamp.
 boolean isPrimary()
          Check whether link is marked primary.
private  void readObject(java.io.ObjectInputStream in)
          Initialize transient variables after reading the object in.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial version ID

node

public TreeNode node
Child node on other end of link

activity

public PeriodTable activity
Table of active periods for this link

primary

public transient boolean primary
Flag indicating primary links

active

public transient boolean active
Flag indicating time-independent link activity

data

public transient java.util.Hashtable data
Storage available to visitors to store partial results
Constructor Detail

Link

public Link(TreeNode node)
Constructor.
Parameters:
TreeNode - node on other end of link
Method Detail

isPrimary

public boolean isPrimary()
Check whether link is marked primary.
Returns:
boolean whether link is primary

isActive

public boolean isActive()
Check whether link is explicitly marked active.
Returns:
boolean whether link is active

isActive

public boolean isActive(long time)
Check whether the link is active for a given timestamp.
Parameters:
long - session timestamp

activate

public long activate(long time,
                     long next)
Mark the link as active for a duration between two timestamps.
Parameters:
long - session timestamp

deactivate

public long deactivate(long time)
Mark the link as inactive starting at the passed timestamp.
Parameters:
long - session timestamp

clearData

public void clearData()
Clear activity table and stored data.

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Initialize transient variables after reading the object in.
Parameters:
ObjectInputStream - input stream
Throws:
IOException - if object not read correctly

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers