Codota Logo
Scenario$Builder.self
Code IndexAdd Codota to your IDE (free)

How to use
self
method
in
com.github.rinde.rinsim.scenario.Scenario$Builder

Best Java code snippets using com.github.rinde.rinsim.scenario.Scenario$Builder.self (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.github.rinde/rinsim-scenario

/**
 * Removes all events that do not satisfy <code>filter</code>.
 * @param filter The {@link Predicate} that specifies which
 *          {@link TimedEvent}s will be retained.
 * @return This, as per the builder pattern.
 */
public Builder filterEvents(Predicate<? super TimedEvent> filter) {
 eventList.retainAll(Collections2.filter(eventList, filter));
 return self();
}
origin: rinde/RinSim

/**
 * Removes all events that do not satisfy <code>filter</code>.
 * @param filter The {@link Predicate} that specifies which
 *          {@link TimedEvent}s will be retained.
 * @return This, as per the builder pattern.
 */
public Builder filterEvents(Predicate<? super TimedEvent> filter) {
 eventList.retainAll(Collections2.filter(eventList, filter));
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * Removes all previously added model builders that are an instance of the
 * specified type.
 * @param type All model builders that are instance of this type are
 *          removed.
 * @param <T> The type.
 * @return This, as per the builder pattern.
 */
public <T extends ModelBuilder<?, ?>> Builder removeModelsOfType(
  Class<T> type) {
 final List<ModelBuilder<?, ?>> toRemove = new ArrayList<>();
 for (final ModelBuilder<?, ?> mb : modelBuilders) {
  if (type.isInstance(mb)) {
   toRemove.add(mb);
  }
 }
 modelBuilders.removeAll(toRemove);
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * The instance id to use for the next scenario that is created.
 * @param id The id to use.
 * @return This, as per the builder pattern.
 */
public Builder instanceId(String id) {
 instanceId = id;
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * Removes all events.
 * @return This, as per the builder pattern.
 */
public Builder clearEvents() {
 eventList.clear();
 return self();
}
origin: rinde/RinSim

/**
 * Removes all events.
 * @return This, as per the builder pattern.
 */
public Builder clearEvents() {
 eventList.clear();
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * Adds the model builders. The builders will be used to instantiate
 * {@link Model}s needed for the scenario.
 * @param builders The model builders to add.
 * @return This, as per the builder pattern.
 */
public Builder addModels(Iterable<? extends ModelBuilder<?, ?>> builders) {
 Iterables.addAll(modelBuilders, builders);
 return self();
}
origin: rinde/RinSim

/**
 * Add the specified {@link TimedEvent} to the builder.
 * @param event The event to add.
 * @return This, as per the builder pattern.
 */
public Builder addEvent(TimedEvent event) {
 eventList.add(event);
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * Adds the model builder. The builders will be used to instantiate
 * {@link Model}s needed for the scenario.
 * @param modelBuilder The model builder to add.
 * @return This, as per the builder pattern.
 */
public Builder addModel(ModelBuilder<?, ?> modelBuilder) {
 modelBuilders.add(modelBuilder);
 return self();
}
origin: rinde/RinSim

/**
 * Add the specified {@link TimedEvent}s to the builder.
 * @param events The events to add.
 * @return This, as per the builder pattern.
 */
public Builder addEvents(Iterable<? extends TimedEvent> events) {
 for (final TimedEvent te : events) {
  addEvent(te);
 }
 return self();
}
origin: rinde/RinSim

/**
 * The {@link ProblemClass} to use for the next scenario that is created.
 * @param pc The problem class to use.
 * @return This, as per the builder pattern.
 */
public Builder problemClass(ProblemClass pc) {
 problemClass = pc;
 return self();
}
origin: rinde/RinSim

/**
 * Adds the model builders. The builders will be used to instantiate
 * {@link Model}s needed for the scenario.
 * @param builders The model builders to add.
 * @return This, as per the builder pattern.
 */
public Builder addModels(Iterable<? extends ModelBuilder<?, ?>> builders) {
 Iterables.addAll(modelBuilders, builders);
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * Add the specified {@link TimedEvent} to the builder.
 * @param event The event to add.
 * @return This, as per the builder pattern.
 */
public Builder addEvent(TimedEvent event) {
 eventList.add(event);
 return self();
}
origin: rinde/RinSim

/**
 * The instance id to use for the next scenario that is created.
 * @param id The id to use.
 * @return This, as per the builder pattern.
 */
public Builder instanceId(String id) {
 instanceId = id;
 return self();
}
origin: rinde/RinSim

/**
 * Removes all previously added model builders that are an instance of the
 * specified type.
 * @param type All model builders that are instance of this type are
 *          removed.
 * @param <T> The type.
 * @return This, as per the builder pattern.
 */
public <T extends ModelBuilder<?, ?>> Builder removeModelsOfType(
  Class<T> type) {
 final List<ModelBuilder<?, ?>> toRemove = new ArrayList<>();
 for (final ModelBuilder<?, ?> mb : modelBuilders) {
  if (type.isInstance(mb)) {
   toRemove.add(mb);
  }
 }
 modelBuilders.removeAll(toRemove);
 return self();
}
origin: com.github.rinde/rinsim-scenario

/**
 * The {@link ProblemClass} to use for the next scenario that is created.
 * @param pc The problem class to use.
 * @return This, as per the builder pattern.
 */
public Builder problemClass(ProblemClass pc) {
 problemClass = pc;
 return self();
}
origin: com.github.rinde/rinsim-scenario

  .iterator().next()));
return self();
origin: com.github.rinde/rinsim-scenario

/**
 * Add the specified {@link TimedEvent}s to the builder.
 * @param events The events to add.
 * @return This, as per the builder pattern.
 */
public Builder addEvents(Iterable<? extends TimedEvent> events) {
 for (final TimedEvent te : events) {
  addEvent(te);
 }
 return self();
}
origin: rinde/RinSim

  .iterator().next()));
return self();
origin: rinde/RinSim

/**
 * Adds the model builder. The builders will be used to instantiate
 * {@link Model}s needed for the scenario.
 * @param modelBuilder The model builder to add.
 * @return This, as per the builder pattern.
 */
public Builder addModel(ModelBuilder<?, ?> modelBuilder) {
 modelBuilders.add(modelBuilder);
 return self();
}
com.github.rinde.rinsim.scenarioScenario$Builderself

Popular methods of Scenario$Builder

  • build
    Build a new Scenario instance.
  • addEvent
    Add the specified TimedEvent to the builder.
  • addEvents
    Add the specified TimedEvents to the builder.
  • addModel
    Adds the model builder. The builders will be used to instantiate Models needed for the scenario.
  • setStopCondition
  • addModels
    Adds the model builders. The builders will be used to instantiate Models needed for the scenario.
  • clearEvents
    Removes all events.
  • instanceId
    The instance id to use for the next scenario that is created.
  • removeModelsOfType
    Removes all previously added model builders that are an instance of the specified type.
  • scenarioLength
  • copyProperties
  • problemClass
    The ProblemClass to use for the next scenario that is created.
  • copyProperties,
  • problemClass,
  • <init>,
  • ensureFrequency,
  • filterEvents,
  • getStopCondition,
  • getTimeWindow

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getApplicationContext (Context)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Socket (java.net)
    Provides a client-side TCP socket.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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