public interface MemoryFactory
The MemoryFactory interface defines methods for creating different types of memories used in the engine.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionnewBetaStorage(int fieldCount) Creates a new instance ofKeyedFactStorage(RETE alpha and beta memories) with the specified field count.<Z> FactStorage<Z>newFactStorage(Type<?> type, Class<Z> storageClass, BiPredicate<Z, Z> identityFunction) Creates a new instance ofFactStoragefor the specified type of facts, storage class, and identity function.
-
Method Details
-
newBetaStorage
Creates a new instance ofKeyedFactStorage(RETE alpha and beta memories) with the specified field count.- Parameters:
fieldCount- the number of fields in the KeyedFactStorage- Returns:
- a new instance of
KeyedFactStorage
-
newMemoryKeyCollection
MemoryKeyCollection newMemoryKeyCollection() -
getValueResolver
ValueResolver getValueResolver() -
newFactStorage
<Z> FactStorage<Z> newFactStorage(Type<?> type, Class<Z> storageClass, BiPredicate<Z, Z> identityFunction) Creates a new instance ofFactStoragefor the specified type of facts, storage class, and identity function.- Type Parameters:
Z- the type parameter representing the facts- Parameters:
type- the type of facts that the storage will handlestorageClass- the class of the storage implementationidentityFunction- the identity function to determine if two facts are equal- Returns:
- a new instance of
FactStoragefor the specified type
-