I am building a tree like data structure. What is the expected behavior if I have a method
public Set getSiblingNodes(Node node);
Should this method return a set including or excluding itself?
Thanks!
I am building a tree like data structure. What is the expected behavior if I have a method
public Set getSiblingNodes(Node node);
Should this method return a set including or excluding itself?
Thanks!
No. It should contain only it's siblings.
A node is not a sibling of itself.
(Why would you think otherwise?)