class MapSequence extends AbstractSequence<Map.Entry> {
  private final Map map;

  public MapSequence(final Map map) {
    super();
    this.map = map;
  }

  @Override
  public int hintSize() {
    return this.map.size();
  }

  @Override
  public Collector newCollector(final int size) {<FILL_FUNCTION_BODY>}

  @SuppressWarnings("unchecked")
  @Override
  public Iterator<Map.Entry> iterator() {
    return this.map.entrySet().iterator();
  }

}

    if (size > 0) {
      return new ListCollector(size, false);
    } else {
      Map coll;
      try {
        coll = this.map.getClass().newInstance();
      } catch (Throwable t) {
        coll = new HashMap();
      }
      final Map container = coll;
      return new Collector() {

        @SuppressWarnings("unchecked")
        @Override
        public void add(final Object e) {
          Entry entry = (Entry) e;
          container.put(entry.getKey(), entry.getValue());
        }

        @Override
        public Object getRawContainer() {
          return container;
        }

      };
    }
  
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>