1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4  class org.aswing.utils.ListNode{
     5  	
     6  	/**
     7  	 * the data stored in this node
     8  	 */
     9  	private var data:Object;
    10  	/**
    11  	 * the node directly behind this node in a list
    12  	 */
    13  	private var nextNode:ListNode;
    14  	/**
    15  	 * the node directly before this node in a list
    16  	 */
    17  	private var preNode:ListNode;
    18  	
    19  	public function ListNode(_data:Object , _preNode:ListNode , _nextNode:ListNode){
    20  		this.data = _data;
    21  		this.nextNode = _nextNode;
    22  		this.preNode = _preNode;
    23  	}
    24  	
    25  	//setter and getter methiods
    26  	public function setData(_data:Object):Void{
    27  		this.data = _data;
    28  	}
    29  	
    30  	public function getData():Object{
    31  		return this.data;
    32  	}
    33  	
    34  	public function setPreNode(_preNode:ListNode):Void{
    35  		this.preNode = _preNode;
    36  	}
    37  	
    38  	public function getPreNode():ListNode{
    39  		return this.preNode;
    40  	}
    41  	
    42  	public function setNextNode(_nextNode:ListNode):Void{
    43  		this.nextNode = _nextNode;
    44  	}
    45  	
    46  	public function getNextNode():ListNode{
    47  		return this.nextNode;
    48  	}
    49  	
    50  	
    51  	
    52  	public function toString():String{
    53  		return "ListNode";
    54  	}
    55  		
    56  }
    57  	
    58