congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Scenario$Builder.self
Code IndexAdd Tabnine 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)

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: rinde/RinSim

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

  .iterator().next()));
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: 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: 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

/**
 * 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: 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

/**
 * Removes all events.
 * @return This, as per the builder pattern.
 */
public Builder clearEvents() {
 eventList.clear();
 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();
}
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

/**
 * 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: 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: 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

/**
 * 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

/**
 * 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();
}
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

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reference (javax.naming)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now