code: public Collection<Double> values() {
      return new AbstractCollection<Double>() {
        @Override
        public Iterator<Double> iterator() {
          return new Iterator<Double>() {
            Iterator<MutableDouble> inner = map.values().iterator();
  
            public boolean hasNext() {
              return inner.hasNext();
            }
  
            public Double next() {
              // copy so as to give safety to mutable internal representation
              return Double.valueOf(inner.next().doubleValue());
            }
  
            public void remove() {
              throw new UnsupportedOperationException();
            }
          };
        }
  
        @Override
        public int size() {
          return map.size();
        }
  
        @Override
        public boolean contains(Object v) {
          return v instanceof Double && map.values().contains(new MutableDouble((Double) v));
        }
  
      };
    }
docs: {@inheritDoc}