/** * Created by haorui on 2019-10-27 . * Des: 播放模式 */enumclassPlayModeEnumprivateconstructor(privatevalvalue:Int){//列表循环LIST_LOOP(0),//随机播放SHUFFLE(1),//单曲循环SINGLE_LOOP(2),//单曲播放SINGLE(3);funvalue():Int{returnvalue}companionobject{funvalueOf(value:Int):PlayModeEnum{when(value){1->returnSHUFFLE2->returnSINGLE_LOOP0->returnLIST_LOOPelse->returnLIST_LOOP}}}}