it.unibo.tuprolog.utils

package it.unibo.tuprolog.utils

Classes

Name Description
interface Cache<K, V> : Any

Mutable, fixed-capacity cache whose eviction strategy depends on the specific implementation

interface Cached<T> : Any
interface Cursor<T> : Any
interface Indexed<K, T> : Any
interface IntIndexed<T> : Indexed<Int, T>, Comparable<IntIndexed<T>>, Any
interface LongIndexed<T> : Indexed<Long, T>, Comparable<LongIndexed<T>>, Any
sealed class Optional<T> : Any

Subpackages

Name Description
package it.unibo.tuprolog.utils.impl

Methods

plus

operator fun <T> Cursor<T>.plus(other: Cursor<T>): Cursor<T>

Receiver

Name Description
Cursor<T>

Parameters

Name Description
other: Cursor<T>

ReturnValue

Name Description
Cursor<T>

cursor

fun <T> Sequence<T>.cursor(): Cursor<T>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Cursor<T>

dequeOf

expect fun <T> dequeOf(vararg items: T): MutableList<T>

Parameters

Name Description
vararg items: T

ReturnValue

Name Description
MutableList<T>

dequeOf

expect fun <T> dequeOf(items: Iterable<T>): MutableList<T>

Parameters

Name Description
items: Iterable<T>

ReturnValue

Name Description
MutableList<T>

dequeOf

expect fun <T> dequeOf(items: Sequence<T>): MutableList<T>

Parameters

Name Description
items: Sequence<T>

ReturnValue

Name Description
MutableList<T>

merge

fun <T> merge(comparator: Comparator<T>, iterables: Iterable<Iterable<T>>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
iterables: Iterable<Iterable<T>>

ReturnValue

Name Description
Sequence<T>

merge

fun <T> merge(iterables: Iterable<Iterable<T>>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
iterables: Iterable<Iterable<T>>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

merge

fun <T> merge(vararg iterables: Iterable<T>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
vararg iterables: Iterable<T>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

merge

fun <T> merge(comparator: Comparator<T>, vararg iterables: Iterable<T>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
vararg iterables: Iterable<T>

ReturnValue

Name Description
Sequence<T>

merge

fun <T> merge(iterables: Sequence><Iterable<T>>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
iterables: Sequence><Iterable<T>>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

merge

fun <T> merge(comparator: Comparator<T>, iterables: Sequence><Iterable<T>>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
iterables: Sequence><Iterable<T>>

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(iterables: Iterable<Sequence<T>>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
iterables: Iterable<Sequence<T>>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(comparator: Comparator<T>, iterables: Iterable<Sequence<T>>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
iterables: Iterable<Sequence<T>>

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(iterables: Sequence><Sequence<T>>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
iterables: Sequence><Sequence<T>>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(comparator: Comparator<T>, iterables: Sequence><Sequence<T>>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
iterables: Sequence><Sequence<T>>

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(vararg iterables: Sequence<T>, comparator: (T, T)->Int): Sequence<T>

Parameters

Name Description
vararg iterables: Sequence<T>
comparator: (T, T)->Int

ReturnValue

Name Description
Sequence<T>

mergeSequences

fun <T> mergeSequences(comparator: Comparator<T>, vararg iterables: Sequence<T>): Sequence<T>

Parameters

Name Description
comparator: Comparator<T>
vararg iterables: Sequence<T>

ReturnValue

Name Description
Sequence<T>

product

fun <T, U, R> Sequence<T>.product(other: Sequence<U>, combinator: (T, U)->R): Sequence<R>

Receiver

Name Description
Sequence<T>

Parameters

Name Description
other: Sequence<U>
combinator: (T, U)->R

ReturnValue

Name Description
Sequence<R>

product

fun <T, U> Sequence<T>.product(other: Sequence<U>): Sequence><Pair<T, U>>

Receiver

Name Description
Sequence<T>

Parameters

Name Description
other: Sequence<U>

ReturnValue

Name Description
Sequence><Pair<T, U>>

squared

fun <T, R> Sequence<T>.squared(combinator: (T, T)->R): Sequence<R>

Receiver

Name Description
Sequence<T>

Parameters

Name Description
combinator: (T, T)->R

ReturnValue

Name Description
Sequence<R>

squared

fun <T> Sequence<T>.squared(): Sequence><Pair<T, T>>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence><Pair<T, T>>

longIndexed

fun <T> Sequence<T>.longIndexed(): Sequence><LongIndexed<T>>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence><LongIndexed<T>>

indexed

fun <T> Sequence<T>.indexed(): Sequence><IntIndexed<T>>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence><IntIndexed<T>>

interleave

fun <T> interleave(iterables: Iterable<Iterable<T>>): Sequence<T>

Parameters

Name Description
iterables: Iterable<Iterable<T>>

ReturnValue

Name Description
Sequence<T>

interleave

fun <T> interleave(vararg iterables: Iterable<T>): Sequence<T>

Parameters

Name Description
vararg iterables: Iterable<T>

ReturnValue

Name Description
Sequence<T>

interleave

fun <T> interleave(iterables: Sequence><Iterable<T>>): Sequence<T>

Parameters

Name Description
iterables: Sequence><Iterable<T>>

ReturnValue

Name Description
Sequence<T>

interleaveSequences

fun <T> interleaveSequences(vararg iterables: Sequence<T>): Sequence<T>

Parameters

Name Description
vararg iterables: Sequence<T>

ReturnValue

Name Description
Sequence<T>

interleaveSequences

fun <T> interleaveSequences(iterables: Sequence><Sequence<T>>): Sequence<T>

Parameters

Name Description
iterables: Sequence><Sequence<T>>

ReturnValue

Name Description
Sequence<T>

interleaveSequences

fun <T> interleaveSequences(iterables: Iterable<Sequence<T>>): Sequence<T>

Parameters

Name Description
iterables: Iterable<Sequence<T>>

ReturnValue

Name Description
Sequence<T>

subsequences

fun <T> Sequence<T>.subsequences(): Sequence><Sequence<T>>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence><Sequence<T>>

subsequences

fun <T> subsequences(vararg items: T): Sequence><Sequence<T>>

Parameters

Name Description
vararg items: T

ReturnValue

Name Description
Sequence><Sequence<T>>

itemWiseEquals

fun <T> itemWiseEquals(iterable1: Iterable<T>, iterable2: Iterable<T>, comparator: (T, T)->Boolean): Boolean

Parameters

Name Description
iterable1: Iterable<T>
iterable2: Iterable<T>
comparator: (T, T)->Boolean

ReturnValue

Name Description
Boolean

itemWiseEquals

fun <T> itemWiseEquals(iterable1: Iterable<T>, iterable2: Iterable<T>): Boolean

Parameters

Name Description
iterable1: Iterable<T>
iterable2: Iterable<T>

ReturnValue

Name Description
Boolean

itemWiseEquals

fun <T> itemWiseEquals(sequence1: Sequence<T>, sequence2: Sequence<T>, comparator: (T, T)->Boolean): Boolean

Parameters

Name Description
sequence1: Sequence<T>
sequence2: Sequence<T>
comparator: (T, T)->Boolean

ReturnValue

Name Description
Boolean

itemWiseEquals

fun <T> itemWiseEquals(sequence1: Sequence<T>, sequence2: Sequence<T>): Boolean

Parameters

Name Description
sequence1: Sequence<T>
sequence2: Sequence<T>

ReturnValue

Name Description
Boolean

itemWiseHashCode

fun <T> itemWiseHashCode(vararg items: T): Int

Parameters

Name Description
vararg items: T

ReturnValue

Name Description
Int

itemWiseHashCode

fun <T> itemWiseHashCode(iterable: Iterable<T>): Int

Parameters

Name Description
iterable: Iterable<T>

ReturnValue

Name Description
Int

itemWiseHashCode

fun <T> itemWiseHashCode(sequence: Sequence<T>): Int

Parameters

Name Description
sequence: Sequence<T>

ReturnValue

Name Description
Int

buffered

fun <T> Sequence<T>.buffered(): Sequence<T>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence<T>

skipIndex

fun <T> Sequence<T>.skipIndex(index: Int): Sequence<T>

Receiver

Name Description
Sequence<T>

Parameters

Name Description
index: Int

ReturnValue

Name Description
Sequence<T>

permutations

fun <T> permutations(vararg items: T): Sequence><List<T>>

Parameters

Name Description
vararg items: T

ReturnValue

Name Description
Sequence><List<T>>

permutations

fun <T> Sequence<T>.permutations(): Sequence><List<T>>

Receiver

Name Description
Sequence<T>

ReturnValue

Name Description
Sequence><List<T>>

toCursor

fun <T> Iterator<T>.toCursor(): Cursor<T>

Receiver

Name Description
Iterator<T>

ReturnValue

Name Description
Cursor<T>

cursor

fun <T> Iterable<T>.cursor(): Cursor<T>

Receiver

Name Description
Iterable<T>

ReturnValue

Name Description
Cursor<T>

subsequences

fun <T> Iterable<T>.subsequences(): Sequence><Sequence<T>>

Receiver

Name Description
Iterable<T>

ReturnValue

Name Description
Sequence><Sequence<T>>

permutations

fun <T> Iterable<T>.permutations(): Sequence><List<T>>

Receiver

Name Description
Iterable<T>

ReturnValue

Name Description
Sequence><List<T>>

cursor

fun <T> Array<T>.cursor(): Cursor<T>

Receiver

Name Description
Array<T>

ReturnValue

Name Description
Cursor<T>

cursor

fun <T> Collection<T>.cursor(): Cursor<T>

Receiver

Name Description
Collection<T>

ReturnValue

Name Description
Cursor<T>

addFirst

expect fun <T> MutableList<T>.addFirst(item: T)

Receiver

Name Description
MutableList<T>

Parameters

Name Description
item: T

ReturnValue

Name Description
Unit

permutations

fun <T> List<T>.permutations(): Sequence><List<T>>

Receiver

Name Description
List<T>

ReturnValue

Name Description
Sequence><List<T>>