DefaultNodeVisitor.java
Go to the documentation of this file.00001 /* -*- indent-tabs-mode: nil -*- */ 00002 package org.gecode.gist; 00003 00004 00005 abstract public class DefaultNodeVisitor implements NodeVisitorInterface { 00006 00007 protected NodeCursorInterface cursor; 00008 00009 public DefaultNodeVisitor(NodeCursorInterface theCursor) { 00010 this.cursor = theCursor; 00011 } 00012 00013 public void setCursor(NodeCursorInterface theCursor) { 00014 this.cursor = theCursor; 00015 } 00016 00017 public NodeCursorInterface getCursor() { 00018 return cursor; 00019 } 00020 00021 abstract public boolean next(); 00022 00023 public void run() { 00024 while (next()); 00025 } 00026 00027 }
