Github user rvesse commented on a diff in the pull request:
https://github.com/apache/jena/pull/449#discussion_r207152306
--- Diff:
jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java ---
@@ -1734,4 +1739,250 @@ public String toString() {
}
}
+
+ /**
+ * Assign a VALUES varName with a multiple items.<br>
+ * Can be used to assign multiple values to a single variable or single
+ * value to multiple variables (if using a List) in the SPARQL
query.<br>
+ * See setGroupedValues to assign multiple values to multiple
variables.<br>
+ * Using "var" with list(prop_A, obj_A) on query "VALUES (?p ?o)
{?var}"
+ * would produce "VALUES (?p ?o) {(prop_A obj_A)}".
+ *
+ *
+ * @param varName
+ * @param items
+ */
+ public void setValues(String varName, Collection<? extends RDFNode>
items) {
+ items.forEach(item -> validateParameterValue(item.asNode()));
--- End diff --
Later code requires that `items` be a `List` so this code should either
enforce it here or otherwise sanitise `items` into a `List` at this point
---