forked from: mx.utils.LinkedList の回し方

by madflash forked from mx.utils.LinkedList の回し方 (diff: 5)
♥0 | Line 26 | Modified 2012-03-05 19:53:20 | MIT License
play

ActionScript3 source code

/**
 * Copyright madflash ( http://wonderfl.net/user/madflash )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/nAcs
 */

<?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();
        list.push("a");
        list.push("b");
        var node:LinkedListNode = list.head;
        while(node) {
            ta.appendText("node = " + node + " node.value = " + node.value + "\n");
            node = (node != list.tail) ? node.next : null;
        }
    }
]]>
</fx:Script>
<s:TextArea id="ta" width="100%" height="100%" editable="false" />

</s:Application>