org.deckfour.xes.info.impl
Class XTimeBoundsImpl

java.lang.Object
  extended by org.deckfour.xes.info.impl.XTimeBoundsImpl
All Implemented Interfaces:
XTimeBounds

public class XTimeBoundsImpl
extends Object
implements XTimeBounds

This class implements timestamp boundaries, which can be used to describe the temporal extent of a log, or of a contained trace.

Author:
Christian W. Guenther (christian@deckfour.org)

Field Summary
protected  Date first
          The earliest timestamp of these boundaries (left bound).
protected  Date last
          The latest timestamp of these boundaries (right bound).
 
Constructor Summary
XTimeBoundsImpl()
          Creates new timestamp boundaries.
 
Method Summary
 Date getEndDate()
          Returns the latest timestamp of these boundaries (right bound).
 Date getStartDate()
          Returns the earliest timestamp of these boundaries (left bound).
 boolean isWithin(Date date)
          Checks, whether the given date is within these boundaries.
 void register(Date date)
          Registers the given date.
 void register(XEvent event)
          Registers the given event, i.e.
 void register(XTimeBounds boundary)
          Registers the given timestamp boundaries.
 String toString()
          Returns a string representation of these boundaries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

first

protected Date first
The earliest timestamp of these boundaries (left bound).


last

protected Date last
The latest timestamp of these boundaries (right bound).

Constructor Detail

XTimeBoundsImpl

public XTimeBoundsImpl()
Creates new timestamp boundaries.

Method Detail

getStartDate

public Date getStartDate()
Description copied from interface: XTimeBounds
Returns the earliest timestamp of these boundaries (left bound).

Specified by:
getStartDate in interface XTimeBounds
Returns:
The earliest timestamp of these boundaries.

getEndDate

public Date getEndDate()
Description copied from interface: XTimeBounds
Returns the latest timestamp of these boundaries (right bound).

Specified by:
getEndDate in interface XTimeBounds
Returns:
The latest timestamp of these boundaries.

isWithin

public boolean isWithin(Date date)
Description copied from interface: XTimeBounds
Checks, whether the given date is within these boundaries.

Specified by:
isWithin in interface XTimeBounds
Parameters:
date - Date to be checked.
Returns:
Whether the specified date is within these boundaries.

register

public void register(XEvent event)
Registers the given event, i.e. if it has a timestamp, the timestamp boundaries will be potentially adjusted to accomodate for inclusion of this event.

Parameters:
event - Event to be registered.

register

public void register(Date date)
Registers the given date. The timestamp boundaries will be potentially adjusted to accomodate for inclusion of this date.

Parameters:
date - Date to be registered.

register

public void register(XTimeBounds boundary)
Registers the given timestamp boundaries. These timestamp boundaries will be potentially adjusted to accomodate for inclusion of the given boundaries.

Parameters:
date - Timestamp boundaries to be registered.

toString

public String toString()
Description copied from interface: XTimeBounds
Returns a string representation of these boundaries.

Specified by:
toString in interface XTimeBounds
Overrides:
toString in class Object