mwalk Platform 0.3.0

mwalk.core
Class PeriodEntry

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

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

A class representing a single period of activity for a link or receiver.

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

Field Summary
 java.util.Hashtable data
          Optional data which can be stored with period
(package private) static long serialVersionUID
          Serialized verios ID
 long start
          Starting timestamp
 long stop
          Ending timestamp
 
Constructor Summary
PeriodEntry()
          Default constructor.
PeriodEntry(long start)
          Constructor.
PeriodEntry(long start, long stop)
          Constructor.
PeriodEntry(PeriodEntry other)
          Copy constructor.
 
Method Summary
 void clearData()
          Clear temporary data for entry
 boolean contains(long time)
          Determine whether the given timestamp falls within this period.
 long duration()
          Calculate duration of period in terms of timestamp units.
 long duration(long bound)
          Calculate duration of period from the start to the given bound in terms of timestamp units.
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
Serialized verios ID

start

public long start
Starting timestamp

stop

public long stop
Ending timestamp

data

public transient java.util.Hashtable data
Optional data which can be stored with period
Constructor Detail

PeriodEntry

public PeriodEntry()
Default constructor.

PeriodEntry

public PeriodEntry(long start)
Constructor.
Parameters:
long - starting timestamp

PeriodEntry

public PeriodEntry(long start,
                   long stop)
Constructor.
Parameters:
long - starting timestamp
long - ending timestamp

PeriodEntry

public PeriodEntry(PeriodEntry other)
Copy constructor.
Parameters:
PeriodEntry - entry to copt
Method Detail

contains

public boolean contains(long time)
Determine whether the given timestamp falls within this period.
Parameters:
long - timestamp to check

duration

public long duration()
Calculate duration of period in terms of timestamp units.
Returns:
long duration of period

duration

public long duration(long bound)
Calculate duration of period from the start to the given bound in terms of timestamp units.
Returns:
long duration of bounded period

clearData

public void clearData()
Clear temporary data for entry

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