// Textbook fragment 13.04 /** Mark a position (vertex or edge) as visited. */ protected void visit(DecorablePosition p) { p.put(STATUS, VISITED); } /** Mark a position (vertex or edge) as unvisited. */ protected void unVisit(DecorablePosition p) { p.put(STATUS, UNVISITED); } /** Test if a position (vertex or edge) has been visited. */ protected boolean isVisited(DecorablePosition p) { return (p.get(STATUS) == VISITED); }