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

org.diirt.datasource.formula.PrintFunctionSetTable Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2010-18 diirt developers. See COPYRIGHT.TXT
 * All rights reserved. Use is subject to license terms. See LICENSE.TXT
 */
package org.diirt.datasource.formula;

import org.diirt.datasource.formula.array.ArrayFunctionSet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * Utility class to print an prefilled HTML table from a function set.
 *
 * @author carcassi
 */
public class PrintFunctionSetTable {

    /**
     * Entry point for the utility.
     *
     * @param args command-line arguments
     */
    public static void main(String[] args) {
        FormulaFunctionSet set = new ArrayFunctionSet();
        List functions = new ArrayList<>(set.getFunctions());
        Collections.sort(functions, new Comparator() {

            @Override
            public int compare(FormulaFunction o1, FormulaFunction o2) {
                return o1.getName().compareTo(o2.getName());
            }
        });

        System.out.println("        \n" +
"            \n" +
"                \n" +
"                    \n" +
"                    \n" +
"                    \n" +
"                    \n" +
"                    \n" +
"                \n" +
"            \n" +
"            ");

        for (FormulaFunction formulaFunction : functions) {
            System.out.println("                ");
            System.out.println("                    ");
            System.out.println("                    ");
            System.out.println("                    ");
            System.out.println("                    ");
            System.out.println("                    ");
            System.out.println("                ");
        }

        System.out.println("            \n" +
"        
SignatureDescriptionNull handlingAlarmTime
" + FormulaFunctions.formatSignature(formulaFunction) + "" + formulaFunction.getDescription() + "Null if one of the arguments is nullHighest alarm of the argumentsLatest valid time of the arguments or now if no valid time is found
"); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy