vertx/src/main/java/eu/internetofus/common/vertx/ModelResources.java
/**
   * Return the function that can be used to search a value by its index.
   *
   * @return the index of the element on the list or {@code -1} if not found.
   *
   * @param <E> type of the elements.
   */
Return the function that can be used to search a value by its index.
@return the index of the element on the list or  -1 if not found.

@param  type of the elements.
Return the function that can be used to search a value by its index . @return the index of the element on the list or - 1 if not found . @param type of the elements .
static public <E> BiFunction<List<E>, Integer, Integer> searchElementByIndex() {
    return (models, id) -> {
      if (models != null && id != null && id > -1 && id < models.size()) {
        return id;
      } else {
        return -1;
      }
    };
  }
static public < E > BiFunction < List < E > , Integer , Integer > searchElementByIndex ( ) { return ( models , id ) -> { if ( models != null && id != null && id > - 1 && id < models . size ( ) ) { return id ; } else { return - 1 ; } } ; }
Return the function that can be used to search a value by its index.
Return the function that can be used to search a value by its index .
// Out of range.