forked from: mx.utils.LinkedList の回し方
forked from mx.utils.LinkedList の回し方 (diff: 3)
ActionScript3 source code
/**
* Copyright tail_y ( http://wonderfl.net/user/tail_y )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/a1FV
*/
<?xml version="1.0" encoding="utf-8"?>
<!-- forked from taiga's mx.utils.LinkedList の回し方 -->
<s:Application
xmlns:fx = "http://ns.adobe.com/mxml/2009"
xmlns:s = "library://ns.adobe.com/flex/spark"
fontSize = "20"
>
<fx:Script>
<![CDATA[
import mx.utils.LinkedList;
import mx.utils.LinkedListNode;
protected override function createChildren():void {
super.createChildren();
var list:LinkedList = new LinkedList();
var node:LinkedListNode = list.head;
var hasTail:Boolean;
while(!hasTail) {
ta.appendText("node = " + node + " node.value = " + node.value + "\n");
hasTail = ( node == list.tail );
node = node.next;
}
}
]]>
</fx:Script>
<s:TextArea id="ta" width="100%" height="100%" editable="false" />
</s:Application>