Exemplo n.º 1
0
 /**
  * Un invokes a {@link Tick} from the {@link TickService}.
  *
  * @param tick The <b>tick</b> to un invoke.
  */
 public void unInvoke(Tick tick) {
   synchronized (TICK_SERVICE) {
     if (!TICK_SERVICE.getTicks().contains(tick))
       try {
         throw new IllegalAccessException(
             "The tick service must contain the specified tick in order to un invoke it.");
       } catch (IllegalAccessException e) {
         e.printStackTrace();
       }
     tick.destroyLater();
   }
 }
Exemplo n.º 2
0
 /**
  * Invokes a new {@link Tick} to the {@link TickService}.
  *
  * @param tick The <b>tick</b> to invoke.
  */
 public void invoke(Tick tick) {
   synchronized (TICK_SERVICE) {
     TICK_SERVICE.getTicks().add(tick);
   }
 }