/*
 * Copyright (C) 1999-2004 <a href="mailto:mandarax@jbdietrich.com">Jens Dietrich</a>
 *
 * 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; either
 * version 2 of the License, or (at your option) any later version.
 *
 * 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.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package org.mandarax.kernel;


/**
 * Constant terms are like individuals in formal logic. A constant term is a kind of wrapper
 * around a certain object. By default, the class of the object is the type of this constant term.
 * The type can also be set using the <code>setType()</code> method, e.g. in case the class of the object is
 * a private implementation class but the type should be the public interface it implements.
 * If the object and the type are not consistent (i.e., if the object is not an instance of the
 * type), an illegal argument exception is throws.<p>
 * Since this objects can also be facts, terms etc., higher level predicate logic
 * can be expressed.
 * @see org.mandarax.kernel.VariableTerm
 * @see org.mandarax.kernel.ComplexTerm
 * @author <A HREF="mailto:mandarax@jbdietrich.com">Jens Dietrich</A>
 * @version 3.3.1 <9 August 2004>
 * @since 1.0
 */
public interface ConstantTerm extends Term {

    /**
     * Get the object.
     * @return the object wrapped by this term
     */
    public Object getObject();

    /**
     * Set the object.
     * @param obj the object
     * @throws an illegal argument exception is thrown if the object is not an instance of
     * the type previously set using setType()
     */
    public void setObject(Object obj);

    /**
     * Set the type.
     * @param type the type
     * @throws an illegal argument exception is thrown if the object previously set using setObject() is not an instance of
     * the type
     */
    public void setType(Class type);
}
