Record Class Version.GitProperties
java.lang.Object
java.lang.Record
org.springframework.shell.core.command.Version.GitProperties
- Enclosing class:
- Version
-
Constructor Summary
ConstructorsConstructorDescriptionGitProperties(@Nullable String branch, @Nullable String commitId, @Nullable String shortCommitId, @Nullable Instant commitTime) Creates an instance of aGitPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringbranch()Returns the value of thebranchrecord component.@Nullable StringcommitId()Returns the value of thecommitIdrecord component.@Nullable InstantReturns the value of thecommitTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theshortCommitIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GitProperties
public GitProperties(@Nullable String branch, @Nullable String commitId, @Nullable String shortCommitId, @Nullable Instant commitTime) Creates an instance of aGitPropertiesrecord class.- Parameters:
branch- the value for thebranchrecord componentcommitId- the value for thecommitIdrecord componentshortCommitId- the value for theshortCommitIdrecord componentcommitTime- the value for thecommitTimerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
branch
Returns the value of thebranchrecord component.- Returns:
- the value of the
branchrecord component
-
commitId
Returns the value of thecommitIdrecord component.- Returns:
- the value of the
commitIdrecord component
-
shortCommitId
Returns the value of theshortCommitIdrecord component.- Returns:
- the value of the
shortCommitIdrecord component
-
commitTime
Returns the value of thecommitTimerecord component.- Returns:
- the value of the
commitTimerecord component
-