ca66f91ac7
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3935 542714f4-19e9-0310-aa3c-eee0fc999fb1
24 lines
524 B
ActionScript
24 lines
524 B
ActionScript
package com.threerings.util {
|
|
|
|
/**
|
|
* Java has Iterator, ActionScript has IViewCursor.
|
|
* The problem is, IViewCursor defines 14 methods and 5 read-only properties.
|
|
* That is a serious PITA to write for every collection that might desire
|
|
* iteration. This provides a simpler alternative.
|
|
*/
|
|
public interface Iterator
|
|
{
|
|
/**
|
|
* Is there another element available?
|
|
*/
|
|
function hasNext () :Boolean;
|
|
|
|
/**
|
|
* Returns the next element.
|
|
*/
|
|
function next () :Object;
|
|
|
|
// TODO: remove() ?
|
|
}
|
|
}
|