Package org.opentcs.data
Class ObjectHistory
java.lang.Object
org.opentcs.data.ObjectHistory
- All Implemented Interfaces:
java.io.Serializable
public class ObjectHistory
extends java.lang.Object
implements java.io.Serializable
A history of events related to an object.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectHistory.Entry
An entry/event in a history. -
Constructor Summary
Constructors Constructor Description ObjectHistory()
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.util.List<ObjectHistory.Entry>
getEntries()
Returns this history's entries.java.lang.String
toString()
ObjectHistory
withEntries(java.util.List<ObjectHistory.Entry> entries)
Returns a copy of this object, with the given entries.ObjectHistory
withEntryAppended(ObjectHistory.Entry entry)
Returns a copy of this object, with the given entry appended.
-
Constructor Details
-
ObjectHistory
public ObjectHistory()Creates a new instance.
-
-
Method Details
-
getEntries
Returns this history's entries.- Returns:
- This history's entries.
-
withEntries
Returns a copy of this object, with the given entries.- Parameters:
entries
- The entries.- Returns:
- A copy of this object, with the given entries.
-
withEntryAppended
Returns a copy of this object, with the given entry appended.- Parameters:
entry
- The entry.- Returns:
- A copy of this object, with the given entry appended.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-