AvailabilityPeriod

Inheritance: java.lang.Object

public class AvailabilityPeriod

Represents a period when a resource is available.

Constructors

ConstructorDescription
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

MethodDescription
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:

ParameterTypeDescription
availableFromjava.util.Datethe date from
availableTojava.util.Datethe date to
availableUnitsdoubleavailable 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:

ParameterTypeDescription
valuejava.util.Datethe 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:

ParameterTypeDescription
valuejava.util.Datethe 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:

ParameterTypeDescription
valuedoublethe percentage of a resource which is available during the specified period.