Serialize secondary constructors

This commit is contained in:
Denis Zharkov
2015-02-25 16:06:16 +03:00
parent e65382e6ec
commit 111a138a2a
8 changed files with 62 additions and 12 deletions
@@ -103,3 +103,5 @@ public fun <E> newHashSetWithExpectedSize(expectedSize: Int): HashSet<E> {
public fun <T> Collection<T>.toReadOnlyList(): List<T> =
if (isEmpty()) Collections.emptyList() else ArrayList(this)
public fun <T: Any> T?.singletonOrEmptyList(): List<T> = if (this != null) Collections.singletonList(this) else Collections.emptyList()