Class Room


  • public final class Room
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Room.RoomBuilder  
    • Constructor Summary

      Constructors 
      Constructor Description
      Room()  
      Room​(java.lang.String rate, java.lang.String numberOfNightsAtRoomRate)
      Creates a new Room instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Room.RoomBuilder builder()  
      boolean equals​(java.lang.Object o)  
      java.lang.String getNumberOfNightsAtRoomRate()
      For lodging, contains the number of nights charged at the rate provided in the rate field.
      java.lang.String getRate()
      For lodging, contains the nightly rate for one room.
      int hashCode()  
      void setNumberOfNightsAtRoomRate​(java.lang.String numberOfNightsAtRoomRate)
      For lodging, contains the number of nights charged at the rate provided in the rate field.
      void setRate​(java.lang.String rate)
      For lodging, contains the nightly rate for one room.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Room

        public Room()
      • Room

        public Room​(java.lang.String rate,
                    java.lang.String numberOfNightsAtRoomRate)
        Creates a new Room instance.
        Parameters:
        rate - For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
        numberOfNightsAtRoomRate - For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
    • Method Detail

      • getRate

        public java.lang.String getRate()
        For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
      • getNumberOfNightsAtRoomRate

        public java.lang.String getNumberOfNightsAtRoomRate()
        For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
      • setRate

        public void setRate​(java.lang.String rate)
        For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
      • setNumberOfNightsAtRoomRate

        public void setNumberOfNightsAtRoomRate​(java.lang.String numberOfNightsAtRoomRate)
        For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object