public boolean retainAll(DoubleIterable source)
{
int oldSize = this.size();
final DoubleSet sourceSet = source instanceof DoubleSet ? (DoubleSet) source : source.toSet();
DoubleDoubleHashMap retained = DoubleDoubleHashMap.this.select(new DoubleDoublePredicate()
{
public boolean accept(double key, double value)
{
return sourceSet.contains(value);
}