Record Class MessageTemplates.Context
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.git.MessageTemplates.Context
- Enclosing class:
MessageTemplates
public static record MessageTemplates.Context(String repo, String branch, String source, String target, LocalDate date)
extends Record
What a template can refer to. Values may be empty.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbranch()Returns the value of thebranchrecord component.static MessageTemplates.ContextThe context of a commit on the branch.date()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static MessageTemplates.ContextThe context of a merge ofsourceintotarget.repo()Returns the value of thereporecord component.source()Returns the value of thesourcerecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Context
Creates an instance of aContextrecord class.- Parameters:
repo- the value for thereporecord componentbranch- the value for thebranchrecord componentsource- the value for thesourcerecord componenttarget- the value for thetargetrecord componentdate- the value for thedaterecord component
-
-
Method Details
-
commit
The context of a commit on the branch. -
merge
The context of a merge ofsourceintotarget. -
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). -
repo
Returns the value of thereporecord component.- Returns:
- the value of the
reporecord component
-
branch
Returns the value of thebranchrecord component.- Returns:
- the value of the
branchrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-