Tabnine Logo
IPredicate.evaluate
Code IndexAdd Tabnine to your IDE (free)

How to use
evaluate
method
in
jsettlers.common.utils.collections.IPredicate

Best Java code snippets using jsettlers.common.utils.collections.IPredicate.evaluate (Showing top 2 results out of 315)

origin: jsettlers/settlers-remake

private void findNext() {
  while (iterator.hasNext()) {
    T curr = iterator.next();
    if (predicate.evaluate(curr)) {
      this.next = curr;
      break;
    }
  }
}
origin: jsettlers/settlers-remake

@Override
public EDirection getDirectionOfSearched(ShortPoint2D position, ESearchType searchType) {
  IPredicate<ELandscapeType> predicate;
  if (searchType == ESearchType.FISHABLE) {
    predicate = ELandscapeType::isWater;
  } else if (searchType == ESearchType.RIVER) {
    predicate = ELandscapeType::isRiver;
  } else {
    return null;
  }
  for (EDirection direction : EDirection.VALUES) {
    int x = direction.getNextTileX(position.x);
    int y = direction.getNextTileY(position.y);
    if (isInBounds(x, y) && predicate.evaluate(landscapeGrid.getLandscapeTypeAt(x, y))) {
      return direction;
    }
  }
  return null;
}
jsettlers.common.utils.collectionsIPredicateevaluate

Javadoc

Evaluates the given object to a boolean value.

Popular methods of IPredicate

    Popular in Java

    • Reading from database using SQL prepared statement
    • setContentView (Activity)
    • findViewById (Activity)
    • startActivity (Activity)
    • Window (java.awt)
      A Window object is a top-level window with no borders and no menubar. The default layout for a windo
    • FileOutputStream (java.io)
      An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
    • SortedSet (java.util)
      SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
    • TimeZone (java.util)
      TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
    • Reference (javax.naming)
    • Loader (org.hibernate.loader)
      Abstract superclass of object loading (and querying) strategies. This class implements useful common
    • Top PhpStorm plugins
    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