MCPcopy Create free account
hub / github.com/SWI-Prolog/packages-jpl / getCurrentSolutionBindings

Method getCurrentSolutionBindings

src/main/java/org/jpl7/Query.java:507–518  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

505 }
506
507 private Map<String, Term> getCurrentSolutionBindings() {
508 if (!open) {
509 throw new JPLException("Query is not open, cannot retrive solution bindings.");
510 } else {
511 Map<String, Term> substitution = new HashMap<String, Term>();
512 // TODO: getSubsts is in Term class, should it be there? Otherwise, where else?
513 // Fill substitution with the bindings representing the current solution
514 Term.getSubsts(substitution, new HashMap<term_t, Variable>(), goal_.args());
515
516 return substitution;
517 }
518 }
519
520 /**
521 * Deprecated. Used to be used only in the context of Term.textToTerm() but a better solution has been

Callers 1

nextSolutionMethod · 0.95

Calls 2

getSubstsMethod · 0.95
argsMethod · 0.45

Tested by

no test coverage detected