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

io.engineblock.activities.json.statements.FileStmtDoc Maven / Gradle / Ivy

Go to download

A engineblock ActivityType (AT) driver module; Provides an activity capable of writing results out via JSON

There is a newer version: 1.0.65
Show newest version
package io.engineblock.activities.json.statements;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

public class FileStmtDoc extends FileStmtBlock {

    private final static Logger logger = LoggerFactory.getLogger(FileStmtDoc.class);
    private List blocks = new ArrayList<>();

    public List getBlocks() {
        return blocks;
    }

    public void setBlocks(List blocks) {
        this.blocks.clear();
        this.blocks.addAll(blocks);
    }

    /**
     * Returns a full view of all blocks, with the global 'this' block inserted at the front of the list,
     * but only if it includes statements.
     * @return a new List of FileStmtSections
     */
    public List getAllBlocks() {
        List allSections = new ArrayList();
        if (getStatements().size()>0) {
            allSections.add(this);
        }
        allSections.addAll(blocks);
        return allSections;
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy