Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
7881a1bb
Commit
7881a1bb
authored
Dec 28, 2017
by
Greg Messner
Browse files
Added remove() method.
parent
b65f0477
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/Pager.java
View file @
7881a1bb
...
@@ -16,9 +16,9 @@ import com.fasterxml.jackson.databind.JavaType;
...
@@ -16,9 +16,9 @@ import com.fasterxml.jackson.databind.JavaType;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
/**
/**
* This class defines an Iterator implementation that is used as a paging iterator for all API methods that
*
<p>
This class defines an Iterator implementation that is used as a paging iterator for all API methods that
* return a List of objects. It hides the details of interacting with the GitLab API when paging is involved
* return a List of objects. It hides the details of interacting with the GitLab API when paging is involved
* simplifying accessing large lists of objects.
* simplifying accessing large lists of objects.
</p>
*
*
* <p>Example usage:</p>
* <p>Example usage:</p>
*
*
...
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
...
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
* while (projectsPager.hasNext())) {
* while (projectsPager.hasNext())) {
* List<Project> projects = projectsPager.next();
* List<Project> projects = projectsPager.next();
* for (Project project : projects) {
* for (Project project : projects) {
* System.out.println(project.getName() + "
-
: " + project.getDescription());
* System.out.println(project.getName() + " : " + project.getDescription());
* }
* }
* }
* }
* </pre>
* </pre>
...
@@ -187,6 +187,16 @@ public class Pager<T> implements Iterator<List<T>>, Constants {
...
@@ -187,6 +187,16 @@ public class Pager<T> implements Iterator<List<T>>, Constants {
return
(
page
(
currentPage
+
1
));
return
(
page
(
currentPage
+
1
));
}
}
/**
* This method is not implemented and will throw an UnsupportedOperationException if called.
*
* @throws UnsupportedOperationException when invoked
*/
@Override
public
void
remove
()
{
throw
new
UnsupportedOperationException
();
}
/**
/**
* Returns the first page of List. Will rewind the iterator.
* Returns the first page of List. Will rewind the iterator.
*
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment