/* * Geotools2 - OpenSource mapping toolkit * http://geotools.org * (C) 2002, Geotools Project Managment Committee (PMC) * * 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 org.geotools.feature.Feature; /** * Defines an expression that holds a literal for return. * * @author Rob Hranac, Vision for New York * @author Chris Holmes, TOPP * @version $Id: LiteralExpression.java,v 1.3 2003/08/07 21:30:36 cholmesny Exp $ */ public interface LiteralExpression extends Expression { /** * Sets the literal. * * @param literal The literal to store inside this expression. * * @throws IllegalFilterException This literal type is not in scope. */ void setLiteral(Object literal) throws IllegalFilterException; /** * Gets the value of this literal. * * @param feature Required by the interface but not used. * * @return the literal held by this expression. Ignores the passed in * feature. */ Object getValue(Feature feature); /** * Returns the literal type. * * @return the short representation of the literal expression type. */ short getType(); /** * Retrieves the literal of this expression. * * @return the literal held by this expression. */ Object getLiteral(); }