lojix/jpc.lojix/src/main/com/thesett/aima/logic/fol/jpc/salt/LojixTermBuilder.java
public Term build()
    {
        Term result;

        if (!isCompound())
        {
            result = getFunctor();
        }
        else
        {
            if (getFunctor().isAtom())
            {
                List<Term> args = getArgs();
                int arity = args.size();
                Functor functor = (Functor) getFunctor();
                int name = interner.internFunctorName(interner.getFunctorName(functor.getName()), arity);
                result = new Functor(name, args.toArray(new Term[arity]));
            }
            else
            {
                throw new IllegalStateException("Invalid functor type.");
            }
        }

        return result;
    }
public Term build()
    {
        Term result;

        if (!isCompound())
        {
            result = getFunctor();
        }
        else
        {
            if (getFunctor().isAtom())
            {
                List<Term> args = getArgs();
                int arity = args.size();
                Functor functor = (Functor) getFunctor();
                int name = interner.internFunctorName(interner.getFunctorName(functor.getName()), arity);
                result = new Functor(name, args.toArray(new Term[arity]));
            }
            else
            {
                throw new IllegalStateException("Invalid functor type.");
            }
        }

        return result;
    }
public Term build ( ) { Term result ; if ( ! isCompound ( ) ) { result = getFunctor ( ) ; } else { if ( getFunctor ( ) . isAtom ( ) ) { List < Term > args = getArgs ( ) ; int arity = args . size ( ) ; Functor functor = ( Functor ) getFunctor ( ) ; int name = interner . internFunctorName ( interner . getFunctorName ( functor . getName ( ) ) , arity ) ; result = new Functor ( name , args . toArray ( new Term [ arity ] ) ) ; } else { throw new IllegalStateException ( "Invalid functor type." ) ; } } return result ; }
{@inheritDoc}
{