public void accept(TreeImageDisplayVisitor visitor, int algoType)
public void accept(TreeImageDisplayVisitor visitor)
    public void accept(TreeImageDisplayVisitor visitor, int algoType)    {        if (visitor == null) throw new NullPointerException("No visitor.");        if (!checkAlgoType(algoType))            throw new IllegalArgumentException("Algorithm not supported.");        Iterator i = childrenDisplay.iterator();                TreeImageDisplay child;        switch (algoType) {            case TreeImageDisplayVisitor.TREEIMAGE_NODE_ONLY:                while (i.hasNext()) {                    child = (TreeImageDisplay) i.next();                    child.accept(visitor, algoType);                }                if (this instanceof TreeImageNode) doAccept(visitor);                break;            case TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY:                while (i.hasNext()) {                    child = (TreeImageDisplay) i.next();                    if (child instanceof TreeImageSet)                        child.accept(visitor, algoType);                }                if (this instanceof TreeImageSet) doAccept(visitor);                break;            case TreeImageDisplayVisitor.ALL_NODES:                while (i.hasNext()) {                    child = (TreeImageDisplay) i.next();                    child.accept(visitor, algoType);                }                doAccept(visitor);                break;        }    }