object单例 3个月前

编程语言
488
object单例

object单例

public class MusicPlayerJava {
    public static MusicPlayerJava INSTANCE = new MusicPlayerJava();

    private MusicPlayerJava(){}
}
class Driver

interface OnExternalDriverMountListener{
    fun onMount(driver: Driver)

    fun onUnmount(driver: Driver)
}

abstract class Player

object MusicPlayer: Player(), OnExternalDriverMountListener{
    override fun onMount(driver: Driver) {

    }

    override fun onUnmount(driver: Driver) {

    }

    val state : Int = 0

    fun play(url : String){

    }

    fun stop(){

    }
}
image
EchoEcho官方
无论前方如何,请不要后悔与我相遇。
1377
发布数
439
关注者
2223020
累计阅读

热门教程文档

爬虫
6小节
MyBatis
19小节
C#
57小节
React
18小节
Docker
62小节