object单例 5个月前

编程语言
506
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
关注者
2243694
累计阅读

热门教程文档

Redis
14小节
QT
33小节
Lua
21小节
MyBatis
19小节
Javascript
24小节