Class XTimeBoundsImpl

  • All Implemented Interfaces:
    XTimeBounds

    public class XTimeBoundsImpl
    extends java.lang.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

      Fields 
      Modifier and Type Field Description
      protected java.util.Date first
      The earliest timestamp of these boundaries (left bound).
      protected java.util.Date last
      The latest timestamp of these boundaries (right bound).
    • Constructor Summary

      Constructors 
      Constructor Description
      XTimeBoundsImpl()
      Creates new timestamp boundaries.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getEndDate()
      Returns the latest timestamp of these boundaries (right bound).
      java.util.Date getStartDate()
      Returns the earliest timestamp of these boundaries (left bound).
      boolean isWithin​(java.util.Date date)
      Checks, whether the given date is within these boundaries.
      void register​(java.util.Date date)
      Registers the given date.
      void register​(XTimeBounds boundary)
      Registers the given timestamp boundaries.
      void register​(XEvent event)
      Registers the given event, i.e.
      java.lang.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 java.util.Date first
        The earliest timestamp of these boundaries (left bound).
      • last

        protected java.util.Date last
        The latest timestamp of these boundaries (right bound).
    • Constructor Detail

      • XTimeBoundsImpl

        public XTimeBoundsImpl()
        Creates new timestamp boundaries.
    • Method Detail

      • getStartDate

        public java.util.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 java.util.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​(java.util.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​(java.util.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 java.lang.String toString()
        Description copied from interface: XTimeBounds
        Returns a string representation of these boundaries.
        Specified by:
        toString in interface XTimeBounds
        Overrides:
        toString in class java.lang.Object