package org.psjava;

import org.psjava.algo.graph.dfs.DFSStatus;
import org.psjava.ds.map.MutableMap;
import org.psjava.goods.GoodMutableMapFactory;

public class DFSStatusMap<V> {

    private MutableMap<V, DFSStatus> map = GoodMutableMapFactory.getInstance().create(); // TODO to Map

    public DFSStatus get(V v) {
        DFSStatus dfsStatus = map.getOrNull(v);
        if (dfsStatus != null) {
            return dfsStatus;
        } else {
            return DFSStatus.NOT_DISCOVERED;
        }
    }

    public void set(V v, DFSStatus s) {
        map.addOrReplace(v, s);
    }

}

@@ -62,90 +62,29 @@
 us;%0A
-import org.psjava.ds.map.MutableMap;%0Aimport org.psjava.goods.GoodMutableMapFactory
+%0Aimport java.util.Map
 ;%0A%0Ap
@@ -126,23 +126,16 @@
 private 
-Mutable
 Map%3CV, D
@@ -154,19 +154,12 @@
 p = 
-GoodMutable
+Hash
 MapF
@@ -169,18 +169,16 @@
 ory.
-getInstanc
+%3CV%3Ecreat
 e().
@@ -190,23 +190,8 @@
 e();
- // TODO to Map
 %0A%0A  
@@ -232,146 +232,34 @@
     
-DFSStatus dfsStatus = map.getOrNull(v);%0A        if (dfsStatus != null) %7B%0A            return dfsStatus;%0A        %7D else %7B%0A            return
+return map.getOrDefault(v,
  DFS
@@ -283,19 +283,10 @@
 ERED
+)
 ;
-%0A        %7D
 %0A   
@@ -345,20 +345,11 @@
 map.
-addOrReplace
+put
 (v, 

use new MapFactory in DFSStatusMap