001    /**
002     * Copyright (C) 2007-2011, Jens Lehmann
003     *
004     * This file is part of DL-Learner.
005     *
006     * DL-Learner is free software; you can redistribute it and/or modify
007     * it under the terms of the GNU General Public License as published by
008     * the Free Software Foundation; either version 3 of the License, or
009     * (at your option) any later version.
010     *
011     * DL-Learner is distributed in the hope that it will be useful,
012     * but WITHOUT ANY WARRANTY; without even the implied warranty of
013     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014     * GNU General Public License for more details.
015     *
016     * You should have received a copy of the GNU General Public License
017     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018     */
019    
020    package org.dllearner.prolog;
021    
022    /**
023     * 
024     * @author Sebastian Bader
025     * 
026     */
027    public abstract class Term implements Cloneable {
028    
029            /**
030             * 
031             * @return Returns true iff this term is ground
032             */
033            public abstract boolean isGround();
034    
035            /**
036             * 
037             * @param variable
038             *            Substitution variable.
039             * @param term
040             *            A term.
041             * @return Returns a new instance of this term, where the variable is
042             *         replaced by the term.
043             */
044            public abstract Term getInstance(Variable variable, Term term);
045    
046            @Override
047            public abstract boolean equals(Object obj);
048    
049            @Override
050            public abstract int hashCode();
051    
052            @Override
053            public abstract Object clone();
054    
055            @Override
056            public abstract String toString();
057    
058            public abstract String toPLString();
059    
060    }