mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
make ChangesetPaginigResult iterable
This commit is contained in:
@@ -35,6 +35,7 @@ package sonia.scm.repository;
|
|||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
@@ -49,7 +50,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "changeset-paging")
|
@XmlRootElement(name = "changeset-paging")
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class ChangesetPagingResult
|
public class ChangesetPagingResult implements Iterable<Changeset>
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,6 +72,28 @@ public class ChangesetPagingResult
|
|||||||
this.changesets = changesets;
|
this.changesets = changesets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//~--- methods --------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @since 1.8
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Iterator<Changeset> iterator()
|
||||||
|
{
|
||||||
|
Iterator<Changeset> it = null;
|
||||||
|
|
||||||
|
if (changesets != null)
|
||||||
|
{
|
||||||
|
it = changesets.iterator();
|
||||||
|
}
|
||||||
|
|
||||||
|
return it;
|
||||||
|
}
|
||||||
|
|
||||||
//~--- get methods ----------------------------------------------------------
|
//~--- get methods ----------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user