File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/github/underscore Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -135,16 +135,18 @@ private static final class MyIterable<T> implements Iterable<T> {
135135 private boolean firstRun = true ;
136136 private T value ;
137137
138- public MyIterable (final T seed , final UnaryOperator <T > unaryOperator ) {
138+ MyIterable (final T seed , final UnaryOperator <T > unaryOperator ) {
139139 this .value = seed ;
140140 this .unaryOperator = unaryOperator ;
141141 }
142142
143143 public Iterator <T > iterator () {
144144 return new Iterator <T >() {
145+ @ Override
145146 public boolean hasNext () {
146147 return true ;
147148 }
149+ @ Override
148150 public T next () {
149151 if (firstRun ) {
150152 firstRun = false ;
@@ -153,7 +155,9 @@ public T next() {
153155 }
154156 return value ;
155157 }
158+ @ Override
156159 public void remove () {
160+ throw new UnsupportedOperationException ("Remove is not supported" );
157161 }
158162 };
159163 }
You can’t perform that action at this time.
0 commit comments