source: trunk/autoquest-core-usageprofiles/src/main/java/de/ugoe/cs/autoquest/usageprofiles/IMemory.java @ 922

Last change on this file since 922 was 922, checked in by sherbold, 12 years ago
  • renaming of packages from de.ugoe.cs.quest to de.ugoe.cs.autoquest
  • Property svn:mime-type set to text/plain
File size: 1.0 KB
Line 
1package de.ugoe.cs.autoquest.usageprofiles;
2
3import java.util.List;
4
5/**
6 * <p>
7 * This interface defines basic functions for classes that implement a memory about the recent
8 * events of a sequences.
9 * </p>
10 *
11 * @author Steffen Herbold
12 * @version 1.0
13 *
14 * @param <T>
15 *            Type of the sequence elements that are memorized.
16 */
17public interface IMemory<T> {
18
19    /**
20     * Adds an element to the end of the memory.
21     *
22     * @param element
23     *            Element to be added.
24     */
25    public void add(T element);
26
27    /**
28     * <p>
29     * Returns the last <code>num</code> memorized elements. If the history is shorter than
30     * <code>num</code>, the length of the returned {@link java.util.List} may be less than
31     * <code>num</code>.
32     * </p>
33     *
34     * @param num
35     *            Number of states from the end of the memory to be returned.
36     * @return {@link java.util.List} of memorized elements.
37     */
38    public List<T> getLast(int num);
39
40}
Note: See TracBrowser for help on using the repository browser.