private Collection regionEntryCollection(Object regionEntries) {
    if (regionEntries == null) {
      return null;
    }
    if (regionEntries instanceof RegionEntry) {
      return Collections.singleton(regionEntries);
    }
    return (Collection) regionEntries;
  }
Convert a RegionEntry or THashSet<RegionEntry> to be consistently a Collection
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java