Record Class RoomDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.RoomDTO
- Record Components:
number- TheRoom.number.type- Represents the extending Room class.floor- TheRoom.floor.capacity- TheRoom.capacity.individualEquipment- TheRoom.getIndividualEquipment().commonEquipment- TheConferenceRoom.commonEquipmentif this Room is aRoomType.CONFERENCE_ROOM.accessibility- TheRoom.accessibility.notes- TheRoom.notes.
public record RoomDTO(@NonNull String number, @NonNull RoomType type, int floor, int capacity, @NonNull Set<IndividualEquipmentDTO> individualEquipment, @Nullable Set<String> commonEquipment, @Nullable Accessibility accessibility, @Nullable String notes)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable AccessibilityThe field for theaccessibilityrecord component.private final intThe field for thecapacityrecord component.The field for thecommonEquipmentrecord component.private final intThe field for thefloorrecord component.private final @NonNull Set<IndividualEquipmentDTO> The field for theindividualEquipmentrecord component.private final @Nullable StringThe field for thenotesrecord component.private final @NonNull StringThe field for thenumberrecord component.private final @NonNull RoomTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRoomDTO(@NonNull String number, @NonNull RoomType type, int floor, int capacity, @NonNull Set<IndividualEquipmentDTO> individualEquipment, @Nullable Set<String> commonEquipment, @Nullable Accessibility accessibility, @Nullable String notes) Creates an instance of aRoomDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable AccessibilityReturns the value of theaccessibilityrecord component.intcapacity()Returns the value of thecapacityrecord component.Returns the value of thecommonEquipmentrecord component.final booleanIndicates whether some other object is "equal to" this one.intfloor()Returns the value of thefloorrecord component.final inthashCode()Returns a hash code value for this object.@NonNull Set<IndividualEquipmentDTO> Returns the value of theindividualEquipmentrecord component.@Nullable Stringnotes()Returns the value of thenotesrecord component.@NonNull Stringnumber()Returns the value of thenumberrecord component.final StringtoString()Returns a string representation of this record class.@NonNull RoomTypetype()Returns the value of thetyperecord component.
-
Field Details
-
number
-
type
-
floor
private final int floorThe field for thefloorrecord component. -
capacity
private final int capacityThe field for thecapacityrecord component. -
individualEquipment
The field for theindividualEquipmentrecord component. -
commonEquipment
The field for thecommonEquipmentrecord component. -
accessibility
The field for theaccessibilityrecord component. -
notes
-
-
Constructor Details
-
RoomDTO
public RoomDTO(@NonNull @NonNull String number, @NonNull @NonNull RoomType type, int floor, int capacity, @NonNull @NonNull Set<IndividualEquipmentDTO> individualEquipment, @Nullable @Nullable Set<String> commonEquipment, @Nullable @Nullable Accessibility accessibility, @Nullable @Nullable String notes) Creates an instance of aRoomDTOrecord class.- Parameters:
number- the value for thenumberrecord componenttype- the value for thetyperecord componentfloor- the value for thefloorrecord componentcapacity- the value for thecapacityrecord componentindividualEquipment- the value for theindividualEquipmentrecord componentcommonEquipment- the value for thecommonEquipmentrecord componentaccessibility- the value for theaccessibilityrecord componentnotes- the value for thenotesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
number
-
type
-
floor
-
capacity
-
individualEquipment
Returns the value of theindividualEquipmentrecord component.- Returns:
- the value of the
individualEquipmentrecord component
-
commonEquipment
Returns the value of thecommonEquipmentrecord component.- Returns:
- the value of the
commonEquipmentrecord component
-
accessibility
Returns the value of theaccessibilityrecord component.- Returns:
- the value of the
accessibilityrecord component
-
notes
-