Class CodeUnitLCS


public class CodeUnitLCS extends Lcs<CodeUnitContainer>
  • Constructor Details

  • Method Details

    • lengthOfX

      protected int lengthOfX()
      Description copied from class: Lcs
      Returns the length of the x sequence
      Specified by:
      lengthOfX in class Lcs<CodeUnitContainer>
      Returns:
      the length of the x sequence
    • lengthOfY

      protected int lengthOfY()
      Description copied from class: Lcs
      Returns the length of the y sequence
      Specified by:
      lengthOfY in class Lcs<CodeUnitContainer>
      Returns:
      the length of the y sequence
    • matches

      public boolean matches(CodeUnitContainer x, CodeUnitContainer y)
      Description copied from class: Lcs
      Returns true if the value of x and y match
      Specified by:
      matches in class Lcs<CodeUnitContainer>
      Parameters:
      x - the x-sequence element of interest
      y - the y-sequence element of interest
      Returns:
      true if x matches y; false otherwise
    • valueOfX

      protected CodeUnitContainer valueOfX(int index)
      Description copied from class: Lcs
      Gets the value of the x sequence at the given index, where index is 1-based
      Specified by:
      valueOfX in class Lcs<CodeUnitContainer>
      Parameters:
      index - the 1-based position of interest in the x sequence
      Returns:
      the value in the x sequence at index
    • valueOfY

      protected CodeUnitContainer valueOfY(int index)
      Description copied from class: Lcs
      Gets the value of the y sequence at the given index, where index is 1-based
      Specified by:
      valueOfY in class Lcs<CodeUnitContainer>
      Parameters:
      index - the 1-based position of interest in the Y sequence
      Returns:
      the value in the y sequence at index