Class Lodging


  • public class Lodging
    extends Object
    Lodging
    • Constructor Detail

      • Lodging

        public Lodging()
    • Method Detail

      • checkInDate

        public Lodging checkInDate​(String checkInDate)
        The check-in date.
        Parameters:
        checkInDate -
        Returns:
        the current Lodging instance, allowing for method chaining
      • getCheckInDate

        public String getCheckInDate()
        The check-in date.
        Returns:
        checkInDate
      • setCheckInDate

        public void setCheckInDate​(String checkInDate)
        The check-in date.
        Parameters:
        checkInDate -
      • numberOfNights

        public Lodging numberOfNights​(Integer numberOfNights)
        The total number of nights the room is booked for.
        Parameters:
        numberOfNights -
        Returns:
        the current Lodging instance, allowing for method chaining
      • getNumberOfNights

        public Integer getNumberOfNights()
        The total number of nights the room is booked for.
        Returns:
        numberOfNights
      • setNumberOfNights

        public void setNumberOfNights​(Integer numberOfNights)
        The total number of nights the room is booked for.
        Parameters:
        numberOfNights -
      • equals

        public boolean equals​(Object o)
        Return true if this Lodging object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static Lodging fromJson​(String jsonString)
                                throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Lodging given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Lodging
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Lodging
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Lodging to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException