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

weka.core.expressionlanguage.core.VariableDeclarations Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This is the stable version. Apart from bugfixes, this version does not receive any other breaking updates.

There is a newer version: 3.8.6
Show newest version
/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see .
 */

/*
 *    VariableDeclarations.java
 *    Copyright (C) 2015 University of Waikato, Hamilton, New Zealand
 *
 */

package weka.core.expressionlanguage.core;

import java.io.Serializable;

/**
 * Interface to expose variables to a program.

* * It is deliberately kept very simple to give as little constraints * as possible to implementations.

* * There is an implied invariant here:
* {@link #hasVariable(String)} == true -> * {@link #getVariable(String)} != null

* * {@link #hasVariable(String)} should be pure i.e. have no side effects.
* Whereas {@link #getVariable(String)} may have side effects.
* (This is useful for creating variables on the fly in {@link #getVariable(String)}) * * @author Benjamin Weber ( benweber at student dot ethz dot ch ) * @version $Revision: 1000 $ */ public interface VariableDeclarations extends Serializable { /** * Whether the variable is declared * * @param name name of the variable being queried * @return whether the variable is declared */ public boolean hasVariable(String name); /** * Tries to fetch a variable

* * Before a variable is fetched it should be checked whether it is declared * through {@link #hasVariable(String)}. * * @param name name of the variable to be fetched * @return an AST (abstract syntax tree) node representing the variable */ public Node getVariable(String name); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy