Hi,
I am creating a model to navigate a tree of symbols and links. My main
purpose of this post is to ascertain the quickest way of navigating the
tree. There are two ways that I am considering, see below. I am unsure
why you would implement interfaces in this design? Is it a performance
issue?
Simple method
-------------
The properties simply reference the actual link objects and symbol
objects.
public class Symbol
{
ArrayList listLinks
ArrayList listLinksEntering
ArrayList listLinksExiting
}
public class Link
{
Symbol fromSymbol
Symbol toSymbol
}
Interface method
----------------
The interfaces ISymbol and ILink implement the properties within each
class. The ICollection stores a collection of ILink references.
public class Symbol : ISymbol
{
ICollection listLinks
ICollection listLinksEntering
ICollection listLinksExiting
}
public class Link : ILink
{
ISymbol fromSymbol
ISymbol toSymbol
}
Thanks in advance.
Jimski