public class ObjectHistory
extends Object
GraphObjectHistoryRecord
Modifier and Type | Field and Description |
---|---|
private ArrayList<HistoryRecord> |
history
List of history events for an object.
|
Constructor and Description |
---|
ObjectHistory() |
Modifier and Type | Method and Description |
---|---|
void |
addHistoryRecord(HistoryRecord he) |
ObjectHistory |
duplicateHistory()
Make a copy of this history, using a clone-like copy for each event.
|
ArrayList<HistoryRecord> |
getEventsByClass(Class c)
Finds all events of the given type
|
ArrayList<HistoryRecord> |
getEventsByType(String type)
Finds all events of the given type
|
ArrayList<HistoryRecord> |
getHistoryEvents()
Returns the list of history events for this history.
|
HistoryRecord |
getLastEvent()
Get the last event in the list (which should be the most recent).
|
HistoryRecord |
getNewestEventByType(String type)
Finds the most recent (last) history event of the given type.
|
HistoryRecord |
getOldestEventByType(String type)
Finds the oldest (first) history event of the given type.
|
boolean |
isEmpty() |
String |
toString() |
String |
toXML(String indent) |
private ArrayList<HistoryRecord> history
public void addHistoryRecord(HistoryRecord he)
public ArrayList<HistoryRecord> getHistoryEvents()
public ObjectHistory duplicateHistory()
HistoryRecord
public boolean isEmpty()
public HistoryRecord getLastEvent()
public HistoryRecord getOldestEventByType(String type)
type
- public HistoryRecord getNewestEventByType(String type)
type
- public ArrayList<HistoryRecord> getEventsByType(String type)
type
- case-insensitive indicator of the typepublic ArrayList<HistoryRecord> getEventsByClass(Class c)
type
- case-insensitive indicator of the typepublic String toString()
toString
in class Object
public String toXML(String indent)