OpType
- the type of operation recordedpublic interface ReversibleOperationRecord<OpType extends Operation<?,?>> extends java.util.function.Consumer<OpType>
Modifier and Type | Method and Description |
---|---|
default void |
clear()
Clear this record.
|
void |
consume(java.util.function.Consumer<OpType> consumer)
For each
Operation in this record from the least-recently added to the most-recently added, use
consumer::accept on that operation and then discard that operation from the record. |
ReversibleOperationRecord<OpType> |
reverse()
Produces a time-reversed version of this record.
|
accept, andThen
void consume(java.util.function.Consumer<OpType> consumer)
Operation
in this record from the least-recently added to the most-recently added, use
consumer::accept
on that operation and then discard that operation from the record.consumer
- the consumer to use in consuming this recorddefault void clear()
ReversibleOperationRecord<OpType> reverse()
reverse()
on the result of this method to recover the original.Licenced under the Apache License, Version 2.0