Adaptor
Definitions
def comparator(_: Proxy[a]): Comparator \ IO
SourceReturns 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]
SourceReturns a fresh Flix Iterator
from the Java iterator iter
.
def fromMap(m: Map): Map[k, v]
SourceReturns 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]
SourceReturns 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 \ IO
SourceReturns 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 \ IO
SourceReturns 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 toTreeMap(m: Map[k, v]): TreeMap \ IO
SourceReturns 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 \ IO
SourceReturns the elements of the given foldable ma
as a new TreeSet
.