/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library 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 * Lesser General Public License for more details. */ package org.geotools.filter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.geotools.filter.expression.ExpressionAbstract; import org.opengis.filter.expression.Expression; import org.opengis.filter.expression.ExpressionVisitor; import org.opengis.filter.expression.Function; import org.opengis.filter.expression.Literal; /** * Default implementation of a Function; you may extend this class to * implement specific functionality. *
*
* @author Cory Horner, Refractions Research
*
*
* @source $URL$
*/
public class FunctionImpl extends ExpressionAbstract implements Function {
/** function name **/
String name;
/** function params **/
List
* Please override this method to produce a value based on the
* provided arguments.
* @param object Object being evaluated; often a Feature
* @return value for the provided object
*/
public Object evaluate(Object object) {
return fallbackValue.evaluate( object );
}
/**
* Sets the function parameters.
*/
@SuppressWarnings("unchecked")
public void setParameters(List