Record Class IndividualEquipmentDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.IndividualEquipmentDTO
- Record Components:
type- TheEquipmentType.nameof theRoomEquipment.type.count- TheIndividualEquipment.count.countCategory- TheIndividualEquipment.countCategory.
public record IndividualEquipmentDTO(@NonNull String type, @NonNull @Range(min=1L,max=2147483647L) Integer count, @Nullable EquipmentCountCategory countCategory)
extends Record
Represents a piece of
IndividualEquipment-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull @Range(min=1L,max=2147483647L) IntegerThe field for thecountrecord component.private final @Nullable EquipmentCountCategoryThe field for thecountCategoryrecord component.private final @NonNull StringThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIndividualEquipmentDTO(@NonNull String type, @NonNull @Range(min=1L,max=2147483647L) Integer count, @Nullable EquipmentCountCategory countCategory) Creates an instance of aIndividualEquipmentDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull @Range(min=1L,max=2147483647L) Integercount()Returns the value of thecountrecord component.@Nullable EquipmentCountCategoryReturns the value of thecountCategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.@NonNull Optional<EquipmentCountCategory> final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@NonNull Stringtype()Returns the value of thetyperecord component.
-
Field Details
-
type
-
count
-
countCategory
The field for thecountCategoryrecord component.
-
-
Constructor Details
-
IndividualEquipmentDTO
public IndividualEquipmentDTO(@NonNull @NonNull String type, @NonNull @Range(min=1L,max=2147483647L) @NonNull @Range(min=1L,max=2147483647L) Integer count, @Nullable @Nullable EquipmentCountCategory countCategory) Creates an instance of aIndividualEquipmentDTOrecord class.- Parameters:
type- the value for thetyperecord componentcount- the value for thecountrecord componentcountCategory- the value for thecountCategoryrecord component
-
-
Method Details
-
getCountCategory
- Returns:
- The
countCategory, if present.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
count
-
countCategory
Returns the value of thecountCategoryrecord component.- Returns:
- the value of the
countCategoryrecord component
-