import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
/**
/**
* Topological sort of dependent nodes in acyclic graphs.
*
+ * @param nodes graph nodes
* @return Sorted {@link List} of {@link Node}s. Order: Nodes with no
* dependencies starting.
* @throws IllegalStateException
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((from == null) ? 0 : from.hashCode());
- result = prime * result + ((to == null) ? 0 : to.hashCode());
+ result = prime * result + Objects.hashCode(from);
+ result = prime * result + Objects.hashCode(to);
return result;
}