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

com.github.rutledgepaulv.qbuilders.nodes.LogicalNode Maven / Gradle / Ivy

/*
 *
 *  *  com.github.rutledgepaulv.qbuilders.nodes.LogicalNode
 *  *  *
 *  *  * Copyright (C) 2016 Paul Rutledge 
 *  *  *
 *  *  * This software may be modified and distributed under the terms
 *  *  * of the MIT license.  See the LICENSE file for details.
 *  *
 *
 */

package com.github.rutledgepaulv.qbuilders.nodes;

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

public abstract class LogicalNode extends AbstractNode {

    private List children = new LinkedList<>();

    public LogicalNode() {}

    public LogicalNode(LogicalNode parent) {
        super(parent);
    }

    public LogicalNode(LogicalNode parent, List children) {
        super(parent);
        setChildren(children);
    }

    public List getChildren() {
        return children;
    }

    public void setChildren(List children) {
        this.children = children;
        children.forEach(child -> child.setParent(this));
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy