@Override
  public int occurrences(Object element) {
    if (!getCollectionType().allowsDuplicates() && !hasLimitIterator) {
      return base.contains(element) ? 1 : 0;
    }
    // expensive!!
    int count = 0;
    /* this.base.iterator() */
    for (Object v : this) {
      if (element == null ? v == null : element.equals(v)) {
        count++;
      }
    }
    return count;
  }
Setter for property modifiable.

@param modifiable New value of property modifiable.
geode-core/src/main/java/org/apache/geode/cache/query/internal/ResultsCollectionWrapper.java