Adaptor
Definitions
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 fromCollectionToIterator(rc: Region[r], proxy: Proxy[a], col: java.util.Collection): Iterator[a, r, r] \ r
SourceReturns a Flix Iterator of the elements in the given Java Collection.
def fromIterator(rc: Region[r], _: Proxy[a], iter: java.util.Iterator): Iterator[a, r, r]
SourceReturns a fresh Flix Iterator
from the Java iterator iter
.
def fromList(l: java.util.List): List[a]
SourceReturns all elements in the given Java List as a Flix List.
def fromListToIterator(rc: Region[r], prx: Proxy[a], l: java.util.List): Iterator[a, r, r] \ r
SourceReturns a Flix Iterator of the elements in the given Java List.
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 fromMapEntry(_: Proxy[k], _: Proxy[v], e: java.util.Map$Entry): (k, v)
SourceReturns the given Java Map.Entry
as a Flix tuple.
def fromMapToIterator(rc: Region[r], m: java.util.Map): Iterator[(k, v), r, r] \ r
SourceReturns a Flix Iterator of the key-value pairs in the given Java Map.
def fromOptional(_: Proxy[a], o: java.util.Optional): Option[a]
SourceReturns the given Java Optional as a Flix Option.
Returns all elements in the given Java Set as a Flix Set.
WARNING: The Flix Set will use the ordering defined on a
.
def fromSetToIterator(rc: Region[r], prx: Proxy[a], s: java.util.Set): Iterator[a, r, r] \ r
SourceReturns a Flix Iterator of the elements in the given Java Set.
def fromStreamToIterator(rc: Region[r], proxy: Proxy[a], strm: java.util.stream.Stream): Iterator[a, r, r] \ r
SourceReturns a Flix Iterator of the elements in the given Java Stream.
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.
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 toMapEntry(p: (k, v)): java.util.Map$Entry \ IO
SourceReturns the key-value pair p
as a new Java Map.Entry
.
def toOptional(o: Option[a]): java.util.Optional \ IO
SourceReturns the o
as a new Java Optional
.
Alias for toTreeSet
.
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
.