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 range
    boolean Overlaps​(DateRange other)
    Whether two DateRanges overlap in any way
    void setEndDate​(java.util.Calendar _endDate)  
    void setStartDate​(java.util.Calendar _startDate)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 range
      endDate - 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

      public boolean Overlaps​(DateRange other)
      Whether two DateRanges 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 class java.lang.Object