private boolean unseenNode(Node candidate){
  if (candidate != null && !alreadySeen.contains(candidate)) {
    current=candidate;
    alreadySeen.add(current);
    return true;
  }
  return false;
}

private boolean unseenNode ( Node candidate ) { if ( candidate != null && ! alreadySeen . contains ( candidate ) ) { current = candidate ; alreadySeen . add ( current ) ; return true ; } return false ; }
test whether the given node is unseen . if so , move current to it , and remember it as a seen node .
