Class DateRange
java.lang.Object
com.jbstrap.ui.components.form.base.DateRange
Class representing a Date range
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the end date of the date rangeGets the start date of the date rangesetEndDate
(Date date) Sets the end date of the date rangeSets the date rangesetStartDate
(Date date) Sets the start date of the date range
-
Field Details
-
MIN_DATE_VALUE
-
MAX_DATE_VALUE
-
-
Constructor Details
-
DateRange
public DateRange()Creates a date range object. This date range will have the minimum/maximum date as its minimum/maximum value. -
DateRange
Creates a date range, with the specified minimum and maximum dates.- Parameters:
startDate
- The starting (minimum) date of the range. Ifnull
, the minimum range value will be the minimum Date valueendDate
- The ending (maximum) date of the range. Ifnull
, the maximum range value will be the maximum Date value- Throws:
IllegalArgumentException
- If the minimum date is greater than the maximum date
-
-
Method Details
-
getStartDate
Gets the start date of the date range- Returns:
- The minimum range value (start date)
-
getEndDate
Gets the end date of the date range- Returns:
- The maximum range value (end date)
-
setStartDate
Sets the start date of the date range- Parameters:
date
- The starting (minimum) date of the range. Ifnull
, the minimum range value will be the minimum Date value- Returns:
- The range
- Throws:
IllegalArgumentException
- If the minimum date is greater than the maximum date
-
setEndDate
Sets the end date of the date range- Parameters:
date
- The ending (maximum) date of the range. Ifnull
, the maximum range value will be the maximum Date value- Returns:
- The range
- Throws:
IllegalArgumentException
- If the minimum date is greater than the maximum date
-
setRange
Sets the date range- Parameters:
startDate
- The starting (minimum) date of the range. Ifnull
, the minimum range value will be the minimum Date valueendDate
- The ending (maximum) date of the range. Ifnull
, the maximum range value will be the maximum Date value- Returns:
- The range
- Throws:
IllegalArgumentException
- If the minimum date is greater than the maximum date
-
equals
-