Implement Node.equals() and .hashCode() to methods to use .contains() on a List (or Collection).