code: public static SetDBIDs ensureSet(DBIDs ids) {
      return ids instanceof SetDBIDs ? (SetDBIDs) ids : newHashSet(ids);
    }
docs: Ensure that the given DBIDs support fast "contains" operations.
  
  @param ids IDs
  @return Set DBIDs.