mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
06.48.2016 00e59615c33ec795efd9ac0758d56c54a42dbbdc
opendj-server-legacy/src/main/java/org/opends/server/util/CollectionUtils.java
@@ -125,4 +125,16 @@
    }
    return outputCollection;
  }
  /**
   * Returns whether the provided iterable is empty, i.e. whether it has not elements.
   *
   * @param iterable
   *          the iterable for which to omake the determination
   * @return {@code true} if the iterable is empty, {@code false} otherwise.
   */
  public static boolean isEmpty(Iterable<?> iterable)
  {
    return !iterable.iterator().hasNext();
  }
}