Last change
on this file since 766 was
655,
checked in by pharms, 12 years ago
|
- removed old copyright file header
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.0 KB
|
Rev | Line | |
---|
[518] | 1 | package de.ugoe.cs.quest.usageprofiles;
|
---|
| 2 |
|
---|
| 3 | import java.util.List;
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * <p>
|
---|
[559] | 7 | * This interface defines basic functions for classes that implement a memory about the recent
|
---|
| 8 | * events of a sequences.
|
---|
[518] | 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 | */
|
---|
| 17 | public interface IMemory<T> {
|
---|
| 18 |
|
---|
[559] | 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);
|
---|
[518] | 26 |
|
---|
[559] | 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);
|
---|
[518] | 39 |
|
---|
| 40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.