Package net.tangly.dev.model
Record Class CommitItem
java.lang.Object
java.lang.Record
net.tangly.dev.model.CommitItem
public record CommitItem(@NotNull Commit commit, @NotNull RepositoryFile file, int addedLines, int removedLines)
extends Record
-
Constructor Summary
ConstructorDescriptionCommitItem
(@NotNull Commit commit, @NotNull RepositoryFile file, int addedLines, int removedLines) Creates an instance of aCommitItem
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theaddedLines
record component.@NotNull Commit
commit()
Returns the value of thecommit
record component.final boolean
Indicates whether some other object is "equal to" this one.@NotNull RepositoryFile
file()
Returns the value of thefile
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of theremovedLines
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CommitItem
public CommitItem(@NotNull @NotNull Commit commit, @NotNull @NotNull RepositoryFile file, int addedLines, int removedLines) Creates an instance of aCommitItem
record class.- Parameters:
commit
- the value for thecommit
record componentfile
- the value for thefile
record componentaddedLines
- the value for theaddedLines
record componentremovedLines
- the value for theremovedLines
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
commit
Returns the value of thecommit
record component.- Returns:
- the value of the
commit
record component
-
file
Returns the value of thefile
record component.- Returns:
- the value of the
file
record component
-
addedLines
public int addedLines()Returns the value of theaddedLines
record component.- Returns:
- the value of the
addedLines
record component
-
removedLines
public int removedLines()Returns the value of theremovedLines
record component.- Returns:
- the value of the
removedLines
record component
-