public void compact() {
    CollectionFactory.trimMap(myMap);
    for (Object eachValue : myMap.values()) {
      if (eachValue instanceof ValueList) {
        //noinspection unchecked
        ((ValueList<V>)eachValue).trimToSize();
      }
    }
  }
public void compact()