Record Class Diff3.Changed
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.git.Diff3.Changed
- All Implemented Interfaces:
Diff3.Chunk
- Enclosing class:
Diff3
public static record Diff3.Changed(List<String> lines, Diff3.Origin origin)
extends Record
implements Diff3.Chunk
A change that merges without conflict:
lines are the merged result.-
Constructor Summary
ConstructorsConstructorDescriptionChanged(List<String> lines, Diff3.Origin origin) Creates an instance of aChangedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lines()Returns the value of thelinesrecord component.origin()Returns the value of theoriginrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Changed
Creates an instance of aChangedrecord class.- Parameters:
lines- the value for thelinesrecord componentorigin- the value for theoriginrecord 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). -
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-