Commit 7881a1bb authored by Greg Messner's avatar Greg Messner
Browse files

Added remove() method.

parent b65f0477
......@@ -16,9 +16,9 @@ import com.fasterxml.jackson.databind.JavaType;
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
* simplifying accessing large lists of objects.
* simplifying accessing large lists of objects.</p>
*
* <p>Example usage:</p>
*
......@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
* while (projectsPager.hasNext())) {
* List&lt;Project&gt; projects = projectsPager.next();
* for (Project project : projects) {
* System.out.println(project.getName() + " -: " + project.getDescription());
* System.out.println(project.getName() + " : " + project.getDescription());
* }
* }
* </pre>
......@@ -187,6 +187,16 @@ public class Pager<T> implements Iterator<List<T>>, Constants {
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.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment