@Override
  public boolean equals(Object o) {
    if (!(o instanceof Bag)) {
      return false;
    }
    Bag otherBag = (Bag) o;
    return size == otherBag.size && elementType.equals(otherBag.elementType)

        && getMap().equals(otherBag.getMap()) && numNulls == otherBag.numNulls;
  }
Return an iterator over the elements in this collection. Duplicates will show up the number of
times it has occurrences.
geode-core/src/main/java/org/apache/geode/cache/query/internal/Bag.java