Interface PairedDataMemory<K>

Type Parameters:
K - the type of keys maintained by this memory storage.
All Superinterfaces:
DataMemory<K>
All Known Implementing Classes:
MapPairedDataMemory, StringMapPairedDataMemory

public interface PairedDataMemory<K> extends DataMemory<K>
An extension of DataMemory that supports advanced retrieval using MemoryEntry. This interface introduces the ability to fetch "detailed" results, returning both the configuration key and its associated value wrapped in a Pair.
Since:
0.1
Author:
a8kj7sea
  • Method Details

    • fetchDetailed

      default <T> Pair<K,T> fetchDetailed(MemoryEntry<T> entry)
      Fetches a detailed result for a given MemoryEntry. This method retrieves the value using the entry's internal logic and pairs it with the original key for comprehensive data handling.
      Type Parameters:
      T - the expected type of the value.
      Parameters:
      entry - the pre-defined memory entry containing the key and type strategy.
      Returns:
      a Pair containing the resolved key and the fetched value.
      Since:
      0.1