Record Class ChangeNameDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ChangeNameDTO
- Record Components:
newName- The new user name which shall replace the old one.
public record ChangeNameDTO(@NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") String newName)
extends Record
Represents an
Actor's with to change their Actor.name.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChangeNameDTO(@NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") String newName) Creates an instance of aChangeNameDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") StringnewName()Returns the value of thenewNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
newName
-
-
Constructor Details
-
ChangeNameDTO
public ChangeNameDTO(@NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") @NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") String newName) Creates an instance of aChangeNameDTOrecord class.- Parameters:
newName- the value for thenewNamerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
newName
-