public static boolean verifyCapabilities ( String command , Capabilities capabilities ) { switch ( command ) { case PLAY : return capabilities . hasPlayPauseControl ( ) ; case PAUSE : return capabilities . hasPlayPauseControl ( ) ; case SELECT_TRACK : return capabilities . isAbleToSelectTrack ( ) ; case NEXT : return capabilities . hasNextPrevious ( ) ; case PREVIOUS : return capabilities . hasNextPrevious ( ) ; case JUMP : return capabilities . isAbleToJump ( ) ; case CHANGE_PLAYBACK : return capabilities . isPlaybackChangeable ( ) ; case CHANGE_VOLUME : return capabilities . canChangeVolume ( ) ; case STOP : return true ; } return false ; }
verifies that the player is capable of handling the command