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