Class Revisions<N extends Number & Comparable<N>, T>
java.lang.Object
org.springframework.data.history.Revisions<N,T>
- All Implemented Interfaces:
Iterable<Revision<N,
,T>> Supplier<Stream<Revision<N,
,T>>> Streamable<Revision<N,
T>>
public class Revisions<N extends Number & Comparable<N>, T>
extends Object
implements Streamable<Revision<N,T>>
Simple wrapper class for a
List
of Revisions
allowing to canonically access the latest revision.
Allows iterating over the underlying Revisions
starting with older revisions.- Author:
- Oliver Gierke, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionReturns the content of theRevisions
instance.Returns the latest revision of the revisions backing the wrapper independently of the order.iterator()
static <N extends Number & Comparable<N>, T>
Revisions<N, T> none()
Creates a new emptyRevisions
instance.static <N extends Number & Comparable<N>, T>
Revisions<N, T> reverse()
Reverses the currentRevisions
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
of
-
none
Creates a new emptyRevisions
instance.- Returns:
- will never be null.
-
getLatestRevision
-
reverse
-
iterator
-
getContent
-