Esempio n. 1
0
  public static double getPercentageSung(Jukebox jb) {
    for (ISound is : tracker) {
      if (jb.getLocation().equals(is.getBlock().getLocation())) {
        return is.getPercentageComplete();
      }
    }

    return 0;
  }
Esempio n. 2
0
 public static void deleteISound(Jukebox jb) {
   ISound tobeGone = null;
   for (ISound is : tracker) {
     if (is.getBlock().getLocation().equals(jb.getLocation())) {
       is.destroy();
       tobeGone = is;
     }
   }
   if (tobeGone != null) {
     tracker.remove(tobeGone);
   }
 }