Record Class SearchFileDetailResponse
java.lang.Object
java.lang.Record
inha.git.project.api.controller.dto.response.SearchFileDetailResponse
- All Implemented Interfaces:
SearchFileResponse
public record SearchFileDetailResponse(@NotNull String name, @NotNull String type, String contents)
extends Record
implements SearchFileResponse
-
Constructor Summary
ConstructorsConstructorDescriptionSearchFileDetailResponse
(@NotNull String name, @NotNull String type, String contents) Creates an instance of aSearchFileDetailResponse
record class.SearchFileDetailResponse
(String name, String contents) -
Method Summary
Modifier and TypeMethodDescriptioncontents()
Returns the value of thecontents
record component.final boolean
Indicates whether some other object is "equal to" this one.getName()
getType()
final int
hashCode()
Returns a hash code value for this object.@NotNull String
name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.@NotNull String
type()
Returns the value of thetype
record component.
-
Constructor Details
-
SearchFileDetailResponse
-
SearchFileDetailResponse
public SearchFileDetailResponse(@NotNull @NotNull String name, @NotNull @NotNull String type, String contents) Creates an instance of aSearchFileDetailResponse
record class.- Parameters:
name
- the value for thename
record componenttype
- the value for thetype
record componentcontents
- the value for thecontents
record component
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceSearchFileResponse
-
getName
- Specified by:
getName
in interfaceSearchFileResponse
-
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
contents
Returns the value of thecontents
record component.- Returns:
- the value of the
contents
record component
-