Package inha.git.common.code
Record Class ReasonDTO
java.lang.Object
java.lang.Record
inha.git.common.code.ReasonDTO
public record ReasonDTO(org.springframework.http.HttpStatus httpStatus, boolean isSuccess, String code, String message)
extends Record
ReasonDTO는 응답 대한 상세 정보를 포함하는 데이터 전송 객체.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()
Returns the value of thecode
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.org.springframework.http.HttpStatus
Returns the value of thehttpStatus
record component.boolean
Returns the value of theisSuccess
record component.message()
Returns the value of themessage
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ReasonDTO
public ReasonDTO(org.springframework.http.HttpStatus httpStatus, boolean isSuccess, String code, String message) Creates an instance of aReasonDTO
record class.- Parameters:
httpStatus
- the value for thehttpStatus
record componentisSuccess
- the value for theisSuccess
record componentcode
- the value for thecode
record componentmessage
- the value for themessage
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
httpStatus
public org.springframework.http.HttpStatus httpStatus()Returns the value of thehttpStatus
record component.- Returns:
- the value of the
httpStatus
record component
-
isSuccess
public boolean isSuccess()Returns the value of theisSuccess
record component.- Returns:
- the value of the
isSuccess
record component
-
code
Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-