AvailabilityPeriod
Inheritance: java.lang.Object
public class AvailabilityPeriod
Represents a period when a resource is available.
Constructors
| Constructor | Description |
|---|---|
| AvailabilityPeriod() | Initializes a new instance of the AvailabilityPeriod. |
| AvailabilityPeriod(Date availableFrom, Date availableTo, double availableUnits) | Initializes a new instance of the AvailabilityPeriod with the specified date range and available units. |
Methods
| Method | Description |
|---|---|
| getAvailableFrom() | Gets the date when a resource becomes available for the specified period. |
| getAvailableTo() | Gets the last date when a resource is available for the specified period. |
| getAvailableUnits() | Gets the percentage of a resource which is available during the specified period. |
| setAvailableFrom(Date value) | Sets the date when a resource becomes available for the specified period. |
| setAvailableTo(Date value) | Sets the last date when a resource is available for the specified period. |
| setAvailableUnits(double value) | Sets the percentage of a resource which is available during the specified period. |
AvailabilityPeriod()
public AvailabilityPeriod()
Initializes a new instance of the AvailabilityPeriod.
AvailabilityPeriod(Date availableFrom, Date availableTo, double availableUnits)
public AvailabilityPeriod(Date availableFrom, Date availableTo, double availableUnits)
Initializes a new instance of the AvailabilityPeriod with the specified date range and available units.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| availableFrom | java.util.Date | the date from |
| availableTo | java.util.Date | the date to |
| availableUnits | double | available units |
getAvailableFrom()
public final Date getAvailableFrom()
Gets the date when a resource becomes available for the specified period.
Returns: java.util.Date - the date when a resource becomes available for the specified period.
getAvailableTo()
public final Date getAvailableTo()
Gets the last date when a resource is available for the specified period.
Returns: java.util.Date - the last date when a resource is available for the specified period.
getAvailableUnits()
public final double getAvailableUnits()
Gets the percentage of a resource which is available during the specified period.
Returns: double - the percentage of a resource which is available during the specified period.
setAvailableFrom(Date value)
public final void setAvailableFrom(Date value)
Sets the date when a resource becomes available for the specified period.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | the date when a resource becomes available for the specified period. |
setAvailableTo(Date value)
public final void setAvailableTo(Date value)
Sets the last date when a resource is available for the specified period.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | the last date when a resource is available for the specified period. |
setAvailableUnits(double value)
public final void setAvailableUnits(double value)
Sets the percentage of a resource which is available during the specified period.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | the percentage of a resource which is available during the specified period. |