001package de.monochromata.anaphors.cog.memory; 002 003import java.util.Collection; 004 005/** 006 * An activation-based memory. 007 * 008 * @param <T> 009 * The type of objects that the chunks in this memory can represents. 010 * @since 1.1.0 011 */ 012public interface Memory<T> { 013 014 /** 015 * Returns a limited number of chunks from memory after sorting the chunks 016 * in descending order by activation. 017 * <p> 018 * TODO: Maybe also add an accessor that limits by a maximum activation. 019 * 020 * @param timestamp 021 * the point in time at which the access occurs (in the format 022 * returned by {@link System#currentTimeMillis()} 023 * @param maximumCount 024 * The maximum number of chunks to return. 025 * @return The collection containing up to {@code maximumCount} chunks 026 * sorted, from highest to lowest activation. 027 */ 028 Collection<Chunk<T>> getChunks(final long timestamp, final int maximumCount); 029 030}