Mercurial > hg > audiodb
annotate bindings/as3/ext/asunit/util/ArrayIterator.as @ 770:c54bc2ffbf92 tip
update tags
author | convert-repo |
---|---|
date | Fri, 16 Dec 2011 11:34:01 +0000 |
parents | 3a0b9700b3d2 |
children |
rev | line source |
---|---|
mas01mj@732 | 1 package asunit.util { |
mas01mj@732 | 2 |
mas01mj@732 | 3 import asunit.util.Iterator; |
mas01mj@732 | 4 |
mas01mj@732 | 5 [ExcludeClass] |
mas01mj@732 | 6 public class ArrayIterator implements Iterator { |
mas01mj@732 | 7 private var list:Array; |
mas01mj@732 | 8 private var index:Number = 0; |
mas01mj@732 | 9 |
mas01mj@732 | 10 public function ArrayIterator(list:Array) { |
mas01mj@732 | 11 this.list = list; |
mas01mj@732 | 12 } |
mas01mj@732 | 13 |
mas01mj@732 | 14 public function hasNext():Boolean { |
mas01mj@732 | 15 return list[index] != null; |
mas01mj@732 | 16 } |
mas01mj@732 | 17 |
mas01mj@732 | 18 public function next():Object { |
mas01mj@732 | 19 return list[index++]; |
mas01mj@732 | 20 } |
mas01mj@732 | 21 |
mas01mj@732 | 22 public function reset():void { |
mas01mj@732 | 23 index = 0; |
mas01mj@732 | 24 } |
mas01mj@732 | 25 } |
mas01mj@732 | 26 } |