Class FactStorageWrapper<FH extends FactHandle,V>

java.lang.Object
org.evrete.util.FactStorageWrapper<FH,V>
All Implemented Interfaces:
FactStorage<FH,V>

public class FactStorageWrapper<FH extends FactHandle,V> extends Object implements FactStorage<FH,V>
  • Constructor Details

    • FactStorageWrapper

      public FactStorageWrapper(FactStorage<FH,V> delegate)
  • Method Details

    • insert

      public void insert(FH factHandle, V value)
      Description copied from interface: FactStorage
      Inserts a fact into the delta storage.
      Specified by:
      insert in interface FactStorage<FH extends FactHandle,V>
      Parameters:
      factHandle - the handle for the fact to be inserted
      value - the value associated with the fact handle
    • remove

      public V remove(FH factHandle)
      Description copied from interface: FactStorage
      Deletes a fact from the memory for both MemoryScope.DELTA and MemoryScope.MAIN scopes.
      Specified by:
      remove in interface FactStorage<FH extends FactHandle,V>
      Parameters:
      factHandle - the previously assigned fact handle
      Returns:
      the previously existing value, or null if no value was associated with the fact handle
    • get

      public V get(FH factHandle)
      Description copied from interface: FactStorage
      Retrieves a fact value by fact handle.
      Specified by:
      get in interface FactStorage<FH extends FactHandle,V>
      Parameters:
      factHandle - the handle for the fact to be retrieved
      Returns:
      the value associated with the fact handle, or null if not found
    • stream

      public Stream<Map.Entry<FH,V>> stream()
      Description copied from interface: FactStorage
      Returns stream of currently stored values.
      Specified by:
      stream in interface FactStorage<FH extends FactHandle,V>
      Returns:
      stream of currently stored mappings.
    • clear

      public void clear()
      Description copied from interface: FactStorage
      Clears the memory
      Specified by:
      clear in interface FactStorage<FH extends FactHandle,V>