@Override public NonGroundFunctionalTerm getNonGroundFunctionalTerm(FunctionSymbol functor, ImmutableTerm... terms) { return new NonGroundFunctionalTermImpl(functor, terms); }
@Override public NonGroundFunctionalTerm getNonGroundFunctionalTerm(FunctionSymbol functor, ImmutableList<ImmutableTerm> terms) { return new NonGroundFunctionalTermImpl(functor, terms); }
@Override public NonGroundFunctionalTerm getNonGroundFunctionalTerm(Predicate functor, ImmutableList<ImmutableTerm> terms) { return new NonGroundFunctionalTermImpl(functor, terms); }
@Override public NonGroundFunctionalTerm getNonGroundFunctionalTerm(Predicate functor, ImmutableTerm... terms) { return new NonGroundFunctionalTermImpl(functor, terms); }
@Override public ImmutableFunctionalTerm getImmutableFunctionalTerm(Function functionalTerm) { if (GroundTermTools.isGroundTerm(functionalTerm)) { return new GroundFunctionalTermImpl(functionalTerm); } else { return new NonGroundFunctionalTermImpl(functionalTerm); } }
@Override public ImmutableFunctionalTerm getImmutableFunctionalTerm(FunctionSymbol functor, ImmutableList<? extends ImmutableTerm> terms) { if (functor instanceof OperationPredicate) { return getImmutableExpression((OperationPredicate)functor, terms); } if (GroundTermTools.areGroundTerms(terms)) { return new GroundFunctionalTermImpl((ImmutableList<? extends GroundTerm>)terms, functor); } else { // Default constructor return new NonGroundFunctionalTermImpl(functor, terms); } }
@Override public ImmutableFunctionalTerm getImmutableFunctionalTerm(Predicate functor, ImmutableList<ImmutableTerm> terms) { if (functor instanceof OperationPredicate) { return getImmutableExpression((OperationPredicate)functor, terms); } if (GroundTermTools.areGroundTerms(terms)) { return new GroundFunctionalTermImpl(functor, terms); } else { // Default constructor return new NonGroundFunctionalTermImpl(functor, terms); } }