Package ghidra.program.util
Class CodeUnitLCS
- java.lang.Object
-
- generic.algorithms.Lcs<CodeUnitContainer>
-
- ghidra.program.util.CodeUnitLCS
-
public class CodeUnitLCS extends Lcs<CodeUnitContainer>
-
-
Constructor Summary
Constructors Constructor Description CodeUnitLCS(java.util.List<CodeUnitContainer> xList, java.util.List<CodeUnitContainer> yList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
lengthOfX()
Returns the length of the x sequenceprotected int
lengthOfY()
Returns the length of the y sequenceboolean
matches(CodeUnitContainer x, CodeUnitContainer y)
Returns true if the value of x and y matchprotected CodeUnitContainer
valueOfX(int index)
Gets the value of the x sequence at the given index, where index is 1-basedprotected CodeUnitContainer
valueOfY(int index)
Gets the value of the y sequence at the given index, where index is 1-based-
Methods inherited from class generic.algorithms.Lcs
doGetLcs, getLcs, getLcs, getSizeLimit, setSizeLimit
-
-
-
-
Constructor Detail
-
CodeUnitLCS
public CodeUnitLCS(java.util.List<CodeUnitContainer> xList, java.util.List<CodeUnitContainer> yList)
-
-
Method Detail
-
lengthOfX
protected int lengthOfX()
Description copied from class:Lcs
Returns the length of the x sequence- Specified by:
lengthOfX
in classLcs<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 classLcs<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 classLcs<CodeUnitContainer>
- Parameters:
x
- the x-sequence element of interesty
- the y-sequence element of interest- Returns:
- true if
x
matchesy
; 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 classLcs<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 classLcs<CodeUnitContainer>
- Parameters:
index
- the 1-based position of interest in the Y sequence- Returns:
- the value in the y sequence at
index
-
-