org.opennms.netmgt.config
Class TimeInterval
java.lang.Object
org.opennms.netmgt.config.TimeInterval
- All Implemented Interfaces:
- Comparable
- Direct Known Subclasses:
- OwnedInterval
public class TimeInterval
- extends Object
- implements Comparable
TimeInterval
public TimeInterval(Date start,
Date end)
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.