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

weka.core.expressionlanguage.core.MacroDeclarations 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 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 .
 */

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

package weka.core.expressionlanguage.core;

/**
 * Interface to expose macros 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 #hasMacro(String)} == true -> * {@link #getMacro(String)} != null

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

* * Before a macro is fetched it shold be checked whether it is declared * through {@link #hasMacro(String)} * @param name * @return */ public Macro getMacro(String name); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy