ETHistory class documentationETHistory : NSObject <ETCollection>
ETHistory keeps a history of objects of some kind. After going back in time, it can go forward again towards the most recent object. Adding an object while at a historic point will discard the forward history.
It is also possible to give ETHistory an NSEnumerator to use as a lazy source for the forward history. This way, a collection of objects can be added as a "future", replacing the current forward history.
ETHistory supports ETCollection protocol, but not ETCollectionMutation which means -[NSObject isMutableCollection] returns NO and an history won't be considered as a mutable represented object by EtoileUI.
- - (id) peek: (int)relativeIndex
Return an object at a position relative to the current object. Return nil if the index refers to a point before the beginning or after the end of time.
- - (void) setFuture: (NSEnumerator *)enumerator
Set an enumerator to use as the forward history, discarding everything after the current object.
- - (void) setMaxHistorySize: (int)maxSize
Set the maximum number of objects to remember. When more objects than this are added, the oldest ones are forgotten.
The default is to remember an unlimited number of objects (max size = 0).
Note that max size only limits the number of objects before -currentObject . Setting a future and peeking into it may force the history to temporarily hold more objects.
- - (NSString *) displayName
See also -[NSObject displayName] .