public static boolean contains(RefEntity element, @NotNull Collection<? extends RefEntity> entities){
    for (RefEntity refEntity : entities) {
      if (Comparing.equal(refEntity, element)) {
        return true;
      }
    }
    return false;
  }
public static boolean contains(RefEntity element, @NotNull Collection<? extends RefEntity> entities)