Started work on the 'crowd' package.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3935 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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() ?
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user