Class Match<T>

java.lang.Object
ghidra.util.bytesearch.Match<T>
Type Parameters:
T - The specific implementation of the BytePattern that was used to create this match

public class Match<T> extends Object
Represents a match of a BytePattern at a given offset in a byte sequence.
  • Constructor Details

    • Match

      public Match(T pattern, long start, int length)
      Construct a Match of a BytePattern that matched at a position in the input byte sequence.
      Parameters:
      pattern - the byte pattern that matched
      start - the location in the input byte sequence where the pattern match begins
      length - the length of the matching sequence
  • Method Details

    • getLength

      public int getLength()
      Returns:
      length in bytes of the matched pattern
    • getStart

      public long getStart()
      Returns:
      offset of match in sequence of bytes
    • getPattern

      public T getPattern()
      Returns:
      the sequence that was matched
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object