code: public SearchResult search(Predicate<N> condition){
          int iteration = 0;
          Iterator<N> it = iterator();
          long begin = System.currentTimeMillis();
          N currentNode = null;
          while(it.hasNext()){
              iteration++;
              currentNode = it.next();
              if (condition.apply(currentNode)) {
                  break;
              }
  
          }
          long end = System.currentTimeMillis();
          return new SearchResult(currentNode, iteration, end - begin);
      }
docs: Executes the search algorithm until the predicate condition is
  satisfied or there are no more nodes to explore.
  
  @param condition predicate with the boolean condition.
  @return {@link es.usc.citius.hipster.algorithm.Algorithm.SearchResult with information about the search}