Package com.redwood.scheduler.api.date
Class Period
- java.lang.Object
- 
- com.redwood.scheduler.api.date.Period
 
- 
- All Implemented Interfaces:
- Comparable<Period>
 
 public class Period extends Object implements Comparable<Period> Class to define a period in time
- 
- 
Field SummaryFields Modifier and Type Field Description static intNOT_SET
 - 
Constructor SummaryConstructors Constructor Description Period(DateTimeZone newBegin, DateTimeZone newEnd)Period(Period newPeriod)Period(TimeZone newTimeZone, long newBeginMillis, long newEndMillis)Period(TimeZone newBeginTimeZone, long newBeginMillis, TimeZone newEndTimeZone, long newEndMillis)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Period other)booleancontains(DateTimeZone aDateTimeZone)Returns true if aDateTimeZone is contained in this period.booleanequals(Object aObject)DateTimeZonegetBegin()longgetBeginMillis()TimeZonegetBeginTimeZone()DateTimeZonegetEnd()longgetEndMillis()TimeZonegetEndTimeZone()inthashCode()booleanintersects(Period aPeriod)Returns true if there is an overlap between aPeriod and this period.booleanisBeginNull()booleanisEndNull()voidsetBegin(DateTimeZone newBegin)voidsetBegin(TimeZone newBeginTimeZone, long newBeginMillis)voidsetBeginMillis(long newBeginMillis)voidsetEnd(DateTimeZone newEnd)voidsetEnd(TimeZone newEndTimeZone, long newEndMillis)voidsetEndMillis(long newEndMillis)voidsetTimeZone(TimeZone newTimeZone)StringtoString()
 
- 
- 
- 
Field Detail- 
NOT_SETpublic static final int NOT_SET - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Periodpublic Period(TimeZone newBeginTimeZone, long newBeginMillis, TimeZone newEndTimeZone, long newEndMillis) 
 - 
Periodpublic Period(TimeZone newTimeZone, long newBeginMillis, long newEndMillis) 
 - 
Periodpublic Period(DateTimeZone newBegin, DateTimeZone newEnd) 
 - 
Periodpublic Period(Period newPeriod) 
 
- 
 - 
Method Detail- 
containspublic boolean contains(DateTimeZone aDateTimeZone) Returns true if aDateTimeZone is contained in this period.- Parameters:
- aDateTimeZone- is the DateTimeZone to test.
- Returns:
- true if aDateTimeZone is contained in this period.
 
 - 
intersectspublic boolean intersects(Period aPeriod) Returns true if there is an overlap between aPeriod and this period.- Parameters:
- aPeriod- is the period to test.
- Returns:
- true if there is an overlap between aPeriod and this period.
 
 - 
getEndMillispublic long getEndMillis() 
 - 
getEndTimeZonepublic TimeZone getEndTimeZone() 
 - 
getBeginMillispublic long getBeginMillis() 
 - 
getBeginTimeZonepublic TimeZone getBeginTimeZone() 
 - 
getEndpublic DateTimeZone getEnd() 
 - 
getBeginpublic DateTimeZone getBegin() 
 - 
isBeginNullpublic boolean isBeginNull() 
 - 
isEndNullpublic boolean isEndNull() 
 - 
setEndMillispublic void setEndMillis(long newEndMillis) 
 - 
setEndpublic void setEnd(TimeZone newEndTimeZone, long newEndMillis) 
 - 
setBeginMillispublic void setBeginMillis(long newBeginMillis) 
 - 
setBeginpublic void setBegin(TimeZone newBeginTimeZone, long newBeginMillis) 
 - 
setTimeZonepublic void setTimeZone(TimeZone newTimeZone) 
 - 
setEndpublic void setEnd(DateTimeZone newEnd) 
 - 
setBeginpublic void setBegin(DateTimeZone newBegin) 
 - 
compareTopublic int compareTo(Period other) - Specified by:
- compareToin interface- Comparable<Period>
 
 
- 
 
-