public class Revisions<N extends Number & Comparable<N>,T> extends Object implements Streamable<Revision<N,T>>
List
of Revisions
allowing to canonically access the latest revision.
Allows iterating over the underlying Revisions
starting with older revisions.Modifier and Type | Method and Description |
---|---|
List<Revision<N,T>> |
getContent()
Returns the content of the
Revisions instance. |
Revision<N,T> |
getLatestRevision()
Returns the latest revision of the revisions backing the wrapper independently of the order.
|
Iterator<Revision<N,T>> |
iterator() |
static <N extends Number & Comparable<N>,T> |
none()
Creates a new empty
Revisions instance. |
static <N extends Number & Comparable<N>,T> |
of(List<? extends Revision<N,T>> revisions)
|
Revisions<N,T> |
reverse()
Reverses the current
Revisions . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toSet, toStreamable, toStreamable
forEach, spliterator
public static <N extends Number & Comparable<N>,T> Revisions<N,T> of(List<? extends Revision<N,T>> revisions)
public static <N extends Number & Comparable<N>,T> Revisions<N,T> none()
Revisions
instance.public Revision<N,T> getLatestRevision()
public Revisions<N,T> reverse()
Revisions
. By default this will return the revisions with the latest revision first.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.