All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.link_intersystems.graph.tree.AbstractTreeModelIterable Maven / Gradle / Ivy

Go to download

There is a newer version: 1.9.7
Show newest version
package com.link_intersystems.graph.tree;

import java.util.Iterator;

import static java.util.Objects.requireNonNull;

/**
 * @author René Link {@literal }
 */
public abstract class AbstractTreeModelIterable implements Iterable {
    protected TreeModel treeModel;
    protected T rootElement;

    public AbstractTreeModelIterable(TreeModel treeModel, T rootElement) {
        this.treeModel = requireNonNull(treeModel);
        this.rootElement = requireNonNull(rootElement);
    }

    @Override
    public Iterator iterator() {
        return createIterator(treeModel, rootElement);
    }

    protected abstract Iterator createIterator(TreeModel treeModel, T rootElement);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy