org.opennms.netmgt.config
Class TimeInterval

java.lang.Object
  extended by org.opennms.netmgt.config.TimeInterval
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
OwnedInterval

public class TimeInterval
extends Object
implements Comparable


Constructor Summary
TimeInterval(Date start, Date end)
           
 
Method Summary
 int comparesTo(Date date)
          Returns -1, 0, 1 based on how date compares to this interval
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 Date getEnd()
           
 Date getStart()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeInterval

public TimeInterval(Date start,
                    Date end)
Method Detail

getStart

public Date getStart()

getEnd

public Date getEnd()

comparesTo

public int comparesTo(Date date)
Returns -1, 0, 1 based on how date compares to this interval

Parameters:
date -
Returns:
-1 if the interval is entirely before date, 0 if the interval contains date, 1 if the interface entirely follows date, for these the starting date is included the ending date excluded

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright © 2009. All Rights Reserved.