Record Class PatchString

java.lang.Object
java.lang.Record
org.variantsync.diffdetective.variation.diff.source.PatchString
Record Components:
getDiff - The patch as a String.
All Implemented Interfaces:
TextBasedDiff, VariationDiffSource

public record PatchString(String getDiff) extends Record implements TextBasedDiff, VariationDiffSource
Source for VariationDiffs that were created from a patch given as a String.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The field for the getDiff record component.

    Fields inherited from interface org.variantsync.diffdetective.variation.diff.source.VariationDiffSource

    Unknown
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a PatchString record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the getDiff record component.
    final int
    Returns a hash code value for this object.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • getDiff

      private final String getDiff
      The field for the getDiff record component.
  • Constructor Details

    • PatchString

      public PatchString(String getDiff)
      Creates an instance of a PatchString record class.
      Parameters:
      getDiff - the value for the getDiff record component
  • Method Details

    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • getDiff

      public String getDiff()
      Returns the value of the getDiff record component.
      Specified by:
      getDiff in interface TextBasedDiff
      Returns:
      the value of the getDiff record component