|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.history.Revisions<N,T>
public class Revisions<N extends Number & Comparable<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.
Constructor Summary | |
---|---|
Revisions(List<? extends Revision<N,T>> revisions)
Creates a new Revisions instance containing the given revisions. |
Method Summary | |
---|---|
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()
|
Revisions<N,T> |
reverse()
Reverses the current Revisions . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Revisions(List<? extends Revision<N,T>> revisions)
Revisions
instance containing the given revisions. Will make sure they are ordered
ascendingly.
revisions
- must not be null.Method Detail |
---|
public Revision<N,T> getLatestRevision()
public Revisions<N,T> reverse()
Revisions
. By default this will return the revisions with the latest revision first.
public Iterator<Revision<N,T>> iterator()
iterator
in interface Iterable<Revision<N extends Number & Comparable<N>,T>>
public List<Revision<N,T>> getContent()
Revisions
instance.
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |