Class DateRange

java.lang.Object
com.dlsc.gemsfx.daterange.DateRange

public class DateRange extends Object
A model class used for the DateRangeView and DateRangePicker controls. A date range defines a start and an end date plus an optional title.
  • Constructor Details

    • DateRange

      public DateRange(String title, LocalDate startDate, LocalDate endDate)
      Constructs a new date range object with the specified parameters.
      Parameters:
      title - the optional title of the date range
      startDate - the start date of the date range
      endDate - the end date of the date range
    • DateRange

      public DateRange(LocalDate startDate, LocalDate endDate)
      Constructs a new date range object with the specified parameters.
      Parameters:
      startDate - the start date of the date range
      endDate - the end date of the date range
    • DateRange

      public DateRange(String title, LocalDate date)
      Constructs a new date range object with the specified title and date where the date will be used as the start and end date (single day range).
      Parameters:
      title - the optional title of the date range
      date - the start and end date of the date range
    • DateRange

      public DateRange(LocalDate date)
      Constructs a new date range object with the specified start date and end date.
      Parameters:
      date - the start and end date of the date range
  • Method Details

    • getTitle

      public String getTitle()
      Returns the optional title of the date range.
      Returns:
      the title of the date range
    • getStartDate

      public LocalDate getStartDate()
      Returns the start date of the range.
      Returns:
      the start date
    • getEndDate

      public LocalDate getEndDate()
      Returns the end date of the range.
      Returns:
      the end date
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the string representation of the value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Parameters:
      o - the o value
      Returns:
      the result
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      the result