/** {@inheritDoc} */ public String getVariableName(Variable variable) { return getVariableName(variable.getName()); }
/** {@inheritDoc} */ public String getFunctorName(Functor functor) { return getFunctorName(functor.getName()); }
/** * Creates an atom (functor with no arguments). * * @param name The name of the atom. * * @return An atom. */ public Functor atom(String name) { int internedName = interner.internFunctorName(name, 0); return new Functor(internedName, null); }
/** * Reports whether or not this term is an atom. A variable is an atom if it has been assigned a value which is an * atom and not otherwise. * * @return <tt>true</tt> if this variable has been assigned atomic value, <tt>false</tt> otherwise. */ public boolean isAtom() { Term t = getValue(); return (t != this) && t.isAtom(); }
/** * Reports whether or not this term is constant (contains no variables). A variable is constant if it has been * assigned a value which is constant, and not otherwise. * * @return <tt>true</tt> if this term is constant, <tt>false</tt> otherwise. */ public boolean isConstant() { Term t = getValue(); return (t != this) && t.isConstant(); }
/** * Reports whether or not this term is a ground term. A variable is a ground term if it has been assigned a value * which is a ground term, and not otherwise. * * @return <tt>true</tt> if this variable has been assigned a ground term, <tt>false</tt> othewise. */ public boolean isGround() { Term t = getValue(); return (t != this) && t.isGround(); }
/** {@inheritDoc} */ public FunctorName getFunctorFunctorName(Functor functor) { return getDeinternedFunctorName(functor.getName()); }
/** {@inheritDoc} */ public int getFunctorArity(Functor functor) { return getFunctorArity(functor.getName()); } }
/** * Reports whether or not this term is compound. A variable is compound if it has been assigned a value which is * compound, and not otherwise. * * @return <tt>true</tt> if this term is compound, <tt>fals</tt> otherwise. */ public boolean isCompound() { Term t = getValue(); return (t != this) && t.isCompound(); }
/** {@inheritDoc} */ public Variable acceptTransformer(TermTransformer transformer) { if (transformer instanceof VariableTransformer) { return ((VariableTransformer) transformer).transform(this); } else { return (Variable) super.acceptTransformer(transformer); } }
/** * Reports whether or not this term is an atom. A variable is an atom if it has been assigned a value which is an * atom and not otherwise. * * @return <tt>true</tt> if this variable has been assigned atomic value, <tt>false</tt> otherwise. */ public boolean isAtom() { Term t = getValue(); return (t != this) && t.isAtom(); }
/** * Reports whether or not this term is a ground term. A variable is a ground term if it has been assigned a value * which is a ground term, and not otherwise. * * @return <tt>true</tt> if this variable has been assigned a ground term, <tt>false</tt> othewise. */ public boolean isGround() { Term t = getValue(); return (t != this) && t.isGround(); }