Record Class BookingTools.BookingDetails
java.lang.Object
java.lang.Record
com.bytedesk.ai.utils.demo.airline.services.BookingTools.BookingDetails
- Enclosing class:
- BookingTools
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for thebookingClass
record component.private final String
The field for thebookingNumber
record component.private final BookingStatus
The field for thebookingStatus
record component.private final LocalDate
The field for thedate
record component.private final String
The field for thefrom
record component.private final String
The field for thename
record component.private final String
The field for theto
record component. -
Constructor Summary
ConstructorsConstructorDescriptionBookingDetails
(String bookingNumber, String name, LocalDate date, BookingStatus bookingStatus, String from, String to, String bookingClass) Creates an instance of aBookingDetails
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebookingClass
record component.Returns the value of thebookingNumber
record component.Returns the value of thebookingStatus
record component.date()
Returns the value of thedate
record component.final boolean
Indicates whether some other object is "equal to" this one.from()
Returns the value of thefrom
record component.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.to()
Returns the value of theto
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
bookingNumber
The field for thebookingNumber
record component. -
name
The field for thename
record component. -
date
The field for thedate
record component. -
bookingStatus
The field for thebookingStatus
record component. -
from
The field for thefrom
record component. -
to
The field for theto
record component. -
bookingClass
The field for thebookingClass
record component.
-
-
Constructor Details
-
BookingDetails
public BookingDetails(String bookingNumber, String name, LocalDate date, BookingStatus bookingStatus, String from, String to, String bookingClass) Creates an instance of aBookingDetails
record class.- Parameters:
bookingNumber
- the value for thebookingNumber
record componentname
- the value for thename
record componentdate
- the value for thedate
record componentbookingStatus
- the value for thebookingStatus
record componentfrom
- the value for thefrom
record componentto
- the value for theto
record componentbookingClass
- the value for thebookingClass
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
bookingNumber
Returns the value of thebookingNumber
record component.- Returns:
- the value of the
bookingNumber
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
date
Returns the value of thedate
record component.- Returns:
- the value of the
date
record component
-
bookingStatus
Returns the value of thebookingStatus
record component.- Returns:
- the value of the
bookingStatus
record component
-
from
Returns the value of thefrom
record component.- Returns:
- the value of the
from
record component
-
to
Returns the value of theto
record component.- Returns:
- the value of the
to
record component
-
bookingClass
Returns the value of thebookingClass
record component.- Returns:
- the value of the
bookingClass
record component
-