Circle Rectangle Arc Methods Methods Methods ------------------------------------- moveBy moveBy moveBy moveTo moveTo moveTo middle middle middle getTop getTop getTop getLeft getLeft getLeft getRight getRight getRight getBottom getBottom getBottom contains contains contains Note: Trival methods not shown (getters, delegators, ...)
========== Method Listings ==========
Graphic Element Method Listings:
Circle Rectangle Arc Shape
Methods Methods Methods Methods
-------------------------------------
None None None None
Note: Trival methods not shown
(getters, delegators, ...)
//Iterating over any object type
while iterator.hasNext()
print(iterator.next());
//Iterating over numbers
Sum = 0
while iterator.hasNext()
sum = sum + iterator.next();
While iterator.hasNext() doAnything(iterator.next());
10 20 30 40
10 get(0) 20 get(1) 30 get(2) 40 get(3)
10 get(0) 20 get(1) 30 get(2) 40 get(3)
Name | Type | Description |
---|---|---|
DynArrayIterator | Class | The class to code |
array | DynamicArray | ivar that we send "get" to |
nextIndex | int | ivar that we use for "get" and that we increment |
list = [10, 20, 30, 40] iter = new Iterator(list) index = 0 while (iter.hasNext()) Test that iter.next() equals list[index] index++