AbstractIterableItems

The shared implementation of ${iterable}_items/2, converting between a Prolog List of items and a JVM/Kotlin collection type T wrapped in an ObjectRef -- letting Prolog code build a java.util.ArrayList/array/java.util.LinkedHashSet (see ArrayItems, ListItems, SetItems) from a logic list, or read one back out of an ObjectRef as a logic list, without going through new_object/3 and repeated invoke_method/3 calls.

Bidirectional: given a logic List as the second argument, unifies the first with a fresh ObjectRef wrapping a T built from its (converted) items; given an ObjectRef wrapping a T as the first argument, unifies the second with the logic list of its items (each converted back to a Term via ObjectToTermConverter).

Throws

if the first argument is neither an unbound variable nor an ObjectRef wrapping a T.

Inheritors

Constructors

Link copied to clipboard
constructor(iterable: String, target: KClass<T>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard