Class KeyRange

java.lang.Object
ghidra.program.model.address.KeyRange

public class KeyRange extends Object
Class for holding a range of database keys (long values)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long
     
    long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyRange(long minKey, long maxKey)
    Constructs a new key range.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(long key)
    Tests if the given key is in the range.
    long
    Return the number of keys contained within range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • minKey

      public long minKey
    • maxKey

      public long maxKey
  • Constructor Details

    • KeyRange

      public KeyRange(long minKey, long maxKey)
      Constructs a new key range. Keys must be ordered and unsigned.
      Parameters:
      minKey - the min key (inclusive)
      maxKey - the max key (inclusive)
  • Method Details

    • contains

      public boolean contains(long key)
      Tests if the given key is in the range.
      Parameters:
      key - the key to test
      Returns:
      true if the key is in the range, false otherwise
    • length

      public long length()
      Return the number of keys contained within range.
      Returns:
      number of keys contained within range