public class ResultHistory extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Date> |
m_Ordered
the ordered list of results.
|
protected Hashtable<Date,Object> |
m_Payloads
for storing an associated payload (timestamp / object).
|
protected Hashtable<Date,Result> |
m_Results
for storing the results (timestamp / result).
|
protected Hashtable<Date,String> |
m_Suffixes
for storing the suffixes for the index (timestamp / suffix).
|
Constructor and Description |
---|
ResultHistory()
Initializes the history.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Result result,
Object payload,
String suffix)
Adds the item to the history.
|
void |
clear()
Empties the history.
|
Result |
get(int index)
Returns the specified history item.
|
Object |
getPayload(int index)
Returns the payload of the specified history item.
|
String |
getSuffix(int index)
Returns the specified suffix.
|
Date |
getTimestamp(int index)
Returns the specified timestamp.
|
Result |
remove(int index)
Removes the specified entry.
|
int |
size()
Returns the number of history items stored.
|
String |
toString()
Returns the history.
|
protected Hashtable<Date,Object> m_Payloads
protected Hashtable<Date,String> m_Suffixes
public void clear()
public int size()
public Result get(int index)
index
- the index of the item to retrievepublic Object getPayload(int index)
index
- the index of the item to retrievepublic Date getTimestamp(int index)
index
- the index of the item to retrievepublic String getSuffix(int index)
index
- the index of the item to retrievepublic void add(Result result, Object payload, String suffix)
result
- the result to addpayload
- the payload to addsuffix
- the suffix to addpublic Result remove(int index)
index
- the history entry to removeCopyright © 2017. All Rights Reserved.