package io.bit3.jsass.type;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * A sass value list.
 */
public class SassMap extends LinkedHashMap<String, SassValue> implements SassValue {
  public static final int TYPE = 7;

  public SassMap() {
  }

  public SassMap(Map<? extends String, ? extends SassValue> map) {
    super(map);
  }

  public SassMap(int initialCapacity) {
    super(initialCapacity);
  }

  public SassMap(int initialCapacity, float loadFactor) {
    super(initialCapacity, loadFactor);
  }

  public SassMap(int initialCapacity, float loadFactor, boolean accessOrder) {
    super(initialCapacity, loadFactor, accessOrder);
  }

  /**
   * Return a libsass compatible (key: value) string representation.
   *
   * @return A libsass compatible (key: value) string representation.
   */
  @Override
  public String toString() {
    String map = entrySet()
        .stream()
        .map(e -> e.getKey() + ": " + e.getValue())
        .collect(Collectors.joining(", "));

    return "(" + map + ")";
  }
}

@@ -286,16 +286,36 @@
 Map() %7B%0A
+    // an empty map%0A
   %7D%0A%0A  p

Add a describing comment to the empty SassMap constructor.