Record Class GithubDto
java.lang.Object
java.lang.Record
com.winchesters.devopsify.dto.response.GithubDto
public record GithubDto(String title, ReadMeStatus readMeStatus, RepositoryStatus repositoryStatus, int numberOfCommits, Date lastCommitDate)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGithubDto
(String title, ReadMeStatus readMeStatus, RepositoryStatus repositoryStatus, int numberOfCommits, Date lastCommitDate) Creates an instance of aGithubDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelastCommitDate
record component.int
Returns the value of thenumberOfCommits
record component.Returns the value of thereadMeStatus
record component.Returns the value of therepositoryStatus
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GithubDto
public GithubDto(String title, ReadMeStatus readMeStatus, RepositoryStatus repositoryStatus, int numberOfCommits, Date lastCommitDate) Creates an instance of aGithubDto
record class.- Parameters:
title
- the value for thetitle
record componentreadMeStatus
- the value for thereadMeStatus
record componentrepositoryStatus
- the value for therepositoryStatus
record componentnumberOfCommits
- the value for thenumberOfCommits
record componentlastCommitDate
- the value for thelastCommitDate
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 '=='. -
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
readMeStatus
Returns the value of thereadMeStatus
record component.- Returns:
- the value of the
readMeStatus
record component
-
repositoryStatus
Returns the value of therepositoryStatus
record component.- Returns:
- the value of the
repositoryStatus
record component
-
numberOfCommits
public int numberOfCommits()Returns the value of thenumberOfCommits
record component.- Returns:
- the value of the
numberOfCommits
record component
-
lastCommitDate
Returns the value of thelastCommitDate
record component.- Returns:
- the value of the
lastCommitDate
record component
-