Codota Logo
Event.getIssuer
Code IndexAdd Codota to your IDE (free)

How to use
getIssuer
method
in
com.github.rinde.rinsim.event.Event

Best Java code snippets using com.github.rinde.rinsim.event.Event.getIssuer (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: rinde/RinSim

void doHandleEvent(Event e) {
 synchronized (computingSimSolvers) {
  final boolean isComputingBefore = isComputing();
  LOGGER.trace("receive: {}, computing: {}, clock is ticking: {}, {}", e,
   isComputingBefore, clock.isTicking(), computingSimSolvers);
  if (e.getEventType() == EventType.START_COMPUTING) {
   if (!isComputingBefore) {
    LOGGER.debug("start computing -> switch to real time");
    clock.switchToRealTime();
   }
   computingSimSolvers.add((RtSimSolverSchedulerBridge) e.getIssuer());
  } else if (e.getEventType() == EventType.DONE_COMPUTING) {
   // done computing
   checkState(computingSimSolvers.remove(e.getIssuer()));
   // if (!isComputing()) {
   // stop();
   // }
  } else {
   throw new IllegalArgumentException("Unexpected event: " + e);
  }
 }
}
origin: rinde/RinSim

 @Override
 public void handleEvent(Event event) {
  assertSame(event.toString(), modelRef, event.getIssuer());
 }
}, PDPModelEventType.values());
origin: rinde/RinSim

@Test
public void followPathEventIssuerType() {
 final MovingRoadUser user = new TestRoadUser();
 model.addObjectAt(user, SW);
 final ListenerEventHistory list = new ListenerEventHistory();
 model.getEventAPI().addListener(list, RoadEventType.MOVE);
 assertTrue(list.getHistory().isEmpty());
 model.followPath(user, newLinkedList(asList(SW, SE, NE, NW)),
  TimeLapseFactory.create(0, 10));
 assertEquals(1, list.getHistory().size());
 assertEquals(RoadEventType.MOVE, list.getHistory().get(0).getEventType());
 assertEquals(model, list.getHistory().get(0).getIssuer());
}
origin: rinde/RinSim

@Test
public void moveToEventIssuerType() {
 final MovingRoadUser user = new TestRoadUser();
 model.addObjectAt(user, SW);
 final ListenerEventHistory list = new ListenerEventHistory();
 model.getEventAPI().addListener(list, RoadEventType.MOVE);
 assertTrue(list.getHistory().isEmpty());
 model.moveTo(user, NW, TimeLapseFactory.create(0, 10));
 assertEquals(1, list.getHistory().size());
 assertEquals(RoadEventType.MOVE, list.getHistory().get(0).getEventType());
 assertEquals(model, list.getHistory().get(0).getIssuer());
}
com.github.rinde.rinsim.eventEventgetIssuer

Popular methods of Event

  • getEventType
  • <init>
    Create a new event instance.
  • toString

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getSystemService (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Reference (javax.naming)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now