code: private static Iterable<BoxUser.Info> getUsersInfoForType(final BoxAPIConnection api,
            final String filterTerm, final String userType, final String externalAppUserId, final String... fields) {
          return new Iterable<BoxUser.Info>() {
              public Iterator<BoxUser.Info> iterator() {
                  QueryStringBuilder builder = new QueryStringBuilder();
                  if (filterTerm != null) {
                      builder.appendParam("filter_term", filterTerm);
                  }
                  if (userType != null) {
                      builder.appendParam("user_type", userType);
                  }
                  if (externalAppUserId != null) {
                      builder.appendParam("external_app_user_id", externalAppUserId);
                  }
                  if (fields.length > 0) {
                      builder.appendParam("fields", fields);
                  }
                  URL url = USERS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString());
                  return new BoxUserIterator(api, url);
              }
          };
      }
docs: Helper method to abstract out the common logic from the various users methods.
  
  @param api               the API connection to be used when retrieving the users.
  @param filterTerm        The filter term to lookup users by (login for external, login or name for managed)
  @param userType          The type of users we want to search with this request.
  Valid values are 'managed' (enterprise users), 'external' or 'all'
  @param externalAppUserId the external app user id that has been set for an app user
  @param fields            the fields to retrieve. Leave this out for the standard fields.
  @return                  An iterator over the selected users.