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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getEntries

      public java.util.List<ObjectHistory.Entry> getEntries()
      Returns this history's entries.
      Returns:
      This history's entries.
    • withEntries

      public ObjectHistory withEntries​(java.util.List<ObjectHistory.Entry> entries)
      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

      public ObjectHistory withEntryAppended​(ObjectHistory.Entry entry)
      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 class java.lang.Object