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

org.bidib.wizard.localhost.BidibNodeContainer Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.localhost;

import java.util.LinkedList;
import java.util.List;

import org.bidib.wizard.api.model.NodeInterface;

public class BidibNodeContainer {

    private final Long uniqueId;

    private int currentNodeTabIndex;

    private List subNodes;

    public BidibNodeContainer(Long uniqueId) {
        this.uniqueId = uniqueId;
    }

    public void setCurrentNodeTabIndex(int currentNodeTabIndex) {
        this.currentNodeTabIndex = currentNodeTabIndex;
    }

    public int getCurrentNodeTabIndex() {
        return currentNodeTabIndex;
    }

    public void setSubNodes(final List subNodes) {
        this.subNodes = new LinkedList<>(subNodes);
    }

    public List getSubNodes() {
        return this.subNodes;
    }

    public void clearSubNodes() {
        this.subNodes = null;
    }

    public NodeInterface getNextSubNode() {
        NodeInterface subNode = null;
        if (this.subNodes != null && currentNodeTabIndex < this.subNodes.size()) {
            subNode = this.subNodes.get(currentNodeTabIndex);
            currentNodeTabIndex++;
        }
        return subNode;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy