using System.Collections; using System.Collections.Generic; namespace Rokojori.Core { public class SinlgeIterator: TreeIterator where N:class { N node; N current; public static SinlgeIterator Create( N node ) { var iterator = new SinlgeIterator(); iterator.node = node; iterator.current = null; return iterator; } public override bool HasNext() { return node != null; } public override N Current() { return current; } protected override void _MoveToNext() { current = node; node = null; } } }