package jp.juggler.util // same as x?.let{ dst.add(it) } fun T.addTo(dst: ArrayList) = dst.add(this) fun > E?.notEmpty(): E? = if (this?.isNotEmpty() == true) this else null fun > E?.notEmpty(): E? = if (this?.isNotEmpty() == true) this else null fun ByteArray?.notEmpty(): ByteArray? = if (this?.isNotEmpty() == true) this else null