Class DateRange
java.lang.Object
org.eclipse.nebula.widgets.ganttchart.utils.DateRange
public class DateRange
extends java.lang.Object
Represents one Date Range
-
Constructor Summary
Constructors Constructor Description DateRange(java.util.Calendar startDate, java.util.Calendar endDate)
Creates a new DateRange between two dates -
Method Summary
Modifier and Type Method Description java.util.Calendar
getEndDate()
java.util.Calendar
getStartDate()
boolean
isWithinRange(java.util.Calendar date)
Whether a date falls between the date rangeboolean
Overlaps(DateRange other)
Whether twoDateRange
s overlap in any wayvoid
setEndDate(java.util.Calendar _endDate)
void
setStartDate(java.util.Calendar _startDate)
java.lang.String
toString()
-
Constructor Details
-
DateRange
public DateRange(java.util.Calendar startDate, java.util.Calendar endDate)Creates a new DateRange between two dates- Parameters:
startDate
- Start date of rangeendDate
- End date of range
-
-
Method Details
-
getStartDate
public java.util.Calendar getStartDate() -
setStartDate
public void setStartDate(java.util.Calendar _startDate) -
getEndDate
public java.util.Calendar getEndDate() -
setEndDate
public void setEndDate(java.util.Calendar _endDate) -
Overlaps
Whether twoDateRange
s overlap in any way- Parameters:
other
- DateRange to check against- Returns:
- True if they overlap
-
isWithinRange
public boolean isWithinRange(java.util.Calendar date)Whether a date falls between the date range- Parameters:
date
- Date to check- Returns:
- true if date is between ranges start and end dates
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-