apatrida
05/23/2017, 2:09 AMdata class ViewportInfo private constructor (val channelIds: List<String>, val startTime: Long, val duration: Long) {
companion object {
@JvmStatic fun create(channelIds: List<String>?, startTime: Long, duration: Long): ViewportInfo {
return ViewportInfo(channelIds ?: emptyList(), startTime, duration)
}
}
}
// from java:
ViewportInfo something = ViewportInfo.create(null, 10, 1);