Example #1
0
 @Override
 public T next() {
   if (next == null) {
     throw new NoSuchElementException();
   }
   current = next;
   index++;
   next = enumerator.nextObject();
   return current;
 }
Example #2
0
 @Callback
 @BindSelector("allObjects")
 public static NSArray allObjects(NSEnumerator __self__, Selector __cmd__) {
   return __self__.allObjects();
 }
Example #3
0
 Iterator(NSEnumerator<T> enumerator) {
   this.enumerator = enumerator;
   index = -1;
   current = null;
   next = enumerator.nextObject();
 }
Example #4
0
 @Callback
 @BindSelector("nextObject")
 public static NSObject _nextObject(NSEnumerator __self__, Selector __cmd__) {
   return __self__._nextObject();
 }