Class ObjectValueMap<T>

java.lang.Object
ghidra.util.map.ValueMap<T>
ghidra.util.map.ObjectValueMap<T>
Type Parameters:
T - object property value type
All Implemented Interfaces:
Serializable

public class ObjectValueMap<T> extends ValueMap<T>
Handles general storage and retrieval of object values indexed by long keys.
See Also:
  • Constructor Details

    • ObjectValueMap

      public ObjectValueMap(String name)
      Constructor for ObjectPropertySet.
      Parameters:
      name - the name associated with this property set.
  • Method Details

    • getDataSize

      public int getDataSize()
      Description copied from class: ValueMap
      Returns the size (in bytes) of the data that is stored in this property set.
      Specified by:
      getDataSize in class ValueMap<T>
      Returns:
      the size (in bytes) of the data that is stored in this property set.
      See Also:
    • putObject

      public void putObject(long index, T value)
      Stores an object at the given index. Any object currently at that index will be replaced by the new object.
      Parameters:
      index - the index at which to store the object.
      value - the object to store.
    • getObject

      public T getObject(long index)
      Retrieves the object stored at the given index.
      Parameters:
      index - the index at which to retrieve the object.
      Returns:
      the object stored at the given index or null if no object is stored at the index.
    • moveIndex

      protected void moveIndex(long from, long to)
      Specified by:
      moveIndex in class ValueMap<T>
    • saveProperty

      protected void saveProperty(ObjectOutputStream oos, long index) throws IOException
      Specified by:
      saveProperty in class ValueMap<T>
      Throws:
      IOException
    • restoreProperty

      protected void restoreProperty(ObjectInputStream ois, long index) throws IOException, ClassNotFoundException
      Specified by:
      restoreProperty in class ValueMap<T>
      Throws:
      IOException
      ClassNotFoundException