Class AvailabilityPeriod


  • public class AvailabilityPeriod
    extends Object

    Represents a period when a resource is available.

    • Constructor Detail

      • AvailabilityPeriod

        public AvailabilityPeriod()

        Initializes a new instance of the AvailabilityPeriod.

      • AvailabilityPeriod

        public AvailabilityPeriod​(Date availableFrom,
                                  Date availableTo,
                                  double availableUnits)

        Initializes a new instance of the AvailabilityPeriod with the specified date range and available units.

        Parameters:
        availableFrom - the date from
        availableTo - the date to
        availableUnits - available units
    • Method Detail

      • getAvailableFrom

        public final Date getAvailableFrom()

        Gets the date when a resource becomes available for the specified period.

        Returns:
        the date when a resource becomes available for the specified period.
      • setAvailableFrom

        public final void setAvailableFrom​(Date value)

        Sets the date when a resource becomes available for the specified period.

        Parameters:
        value - 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:
        the last date when a resource is available for the specified period.
      • setAvailableTo

        public final void setAvailableTo​(Date value)

        Sets the last date when a resource is available for the specified period.

        Parameters:
        value - 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:
        the percentage of a resource which is available during the specified period.
      • setAvailableUnits

        public final void setAvailableUnits​(double value)

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

        Parameters:
        value - the percentage of a resource which is available during the specified period.