jlleitschuh
06/29/2017, 5:08 PMimport com.google.common.collect.ImmutableList
import com.google.common.collect.ImmutableSet
fun <T> Collection<T>.toImmutableList() : ImmutableList<T> = ImmutableList.copyOf(this)
fun <T> Collection<T>.toImmutableSet() : ImmutableSet<T> = ImmutableSet.copyOf(this)
operator fun <T> ImmutableList<T>.plus(elements : ImmutableList<T>) =
ImmutableList.builder<T>().addAll(this).addAll(elements).build()!!