code: public static <T> T findOne(T[] array, Filter<T> filter) {
  
      Assert.notNull(filter, "Filter is required");
  
      return stream(nullSafeArray(array)).filter(filter::accept).findFirst().orElse(null);
    }
docs: Searches the array for the first element accepted by the {@link Filter}.
  
  @param <T> Class type of the elements in the array.
  @param array array to search.
  @param filter {@link Filter} used to find the first element in the array accepted by the {@link Filter}.
  @return the first element from the array accepted by the {@link Filter} or null if no such element is found.
  @throws IllegalArgumentException if {@link Filter} is null.
  @see org.cp.elements.lang.Filter
  @see #findAll(Object[], Filter)