code: public static ArrayDBIDs ensureArray(DBIDs ids) {
      return ids instanceof ArrayDBIDs ? (ArrayDBIDs) ids : newArray(ids);
    }
docs: Ensure that the given DBIDs are array-indexable.
  
  @param ids IDs
  @return Array DBIDs.