Hi! I'm trying to define a list of objects that could be a binary tree or a Processtrees.
The binary tree is already defined and works fine, don't worry about it.
A Processtree is a binary tree generated by a Process, a Process is defined by a Name and a State
Processtree looks like this:
Class Processtree{
String ProcessName;
String StateName;
Binary tree ProcTree;
}
So I think that I don't need to worry about the Processtree, but I need to define a list of objects that could be a Binary tree or a Processtree.
The Processtree implementation may change, so I think I should define a common Tree interface and make Processtree and Binary tree implement it, but I don't know if I could define an ArrayList of this Tree..
I'm new to java, thanks in advance