Wondering if anyone has a class/classes for navigating thru an adjacent list set. I'm looking for something that will let me go thru the items as a list, and each item would have methods like, hasChildren(), isFirstChild(), isLastChild() and properties like parent, children, id, parent_id etc.

Also be interested in seeing/hearing about ideas on an interface for something like this.