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