Adaptor

Definitions

def comparator(_: Proxy[a]): Comparator \ IOSource

Returns a comparator for elements of type a.

The comparator is backed by the ordering on a.

Note: Currently requires a Proxy (until Java types support generics).

def fromIterator(rc: Region[r], _: Proxy[a], iter: Iterator): Iterator[a, r, r]Source

Returns a fresh Flix Iterator from the Java iterator iter.

def fromList(l: List): List[a]Source

Returns all elements in the given Java List as a Flix List.

def fromMap(m: Map): Map[k, v]Source

Returns all key-value pairs in the given Java Map as a Flix Map.

WARNING: The Flix Map will use the ordering defined on k.

def fromSet(l: Set): Set[a]Source

Returns all elements in the given Java Set as a Flix Set.

WARNING: The Flix Set will use the ordering defined on a.

def toArrayList(ma: m[a]): ArrayList \ IOSource

Returns the elements of the given foldable ma as a new Java ArrayList.

Creates a fresh ArrayList and copies all elements in ma into it.

def toLinkedList(ma: m[a]): LinkedList \ IOSource

Returns the elements of the given foldable ma as a new Java LinkedList.

Creates a fresh LinkedList and copies all elements in ma into it.

def toList(ma: m[a]): List \ IOSource

Alias for toArrayList.

def toMap(m: Map[k, v]): Map \ IOSource

Alias for toTreeMap.

def toSet(ma: m[a]): Set \ IOSource

Alias for toTreeSet.

def toTreeMap(m: Map[k, v]): TreeMap \ IOSource

Returns all key-value pairs of the given map m as a new TreeMap.

The TreeMap uses a Comparator constructed from the Order on k.

def toTreeSet(ma: m[a]): TreeSet \ IOSource

Returns the elements of the given foldable ma as a new TreeSet.