org.bidib.wizard.localhost.BidibNodeContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-localhost Show documentation
Show all versions of bidibwizard-localhost Show documentation
jBiDiB BiDiB Wizard localhost POM
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;
}
}