Returns true if there is another item in the results list. @return boolean
()
| 85 | * @return boolean |
| 86 | */ |
| 87 | public boolean hasNext() { |
| 88 | if (pos < list.size()) { |
| 89 | return true; |
| 90 | } else { |
| 91 | if (!lastPage) { |
| 92 | try { |
| 93 | PagedItems<T> items = this.getPage(); |
| 94 | this.pos = 0; |
| 95 | this.list = items.list; |
| 96 | this.lastPage = items.lastPage; |
| 97 | this.next = items.next; |
| 98 | |
| 99 | return this.list.size() > 0; |
| 100 | } catch (ChainException e) { |
| 101 | return false; |
| 102 | } |
| 103 | } else { |
| 104 | return false; |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * This method is unsupported. |