java - Tree that sorts classes hierarchicly -


I need a tree structure which gradually adds all sections. I have to get all those sections which are the successors of a particular class.

Example:

I add the following sections. Public Static Class Event Event {} Public Static Class PlayerEvent Event {} Public Static Class PlayerMoveEvent Extended PlayerEvent {} Public Stable Class WorldEvent Program Extended {}

It should sort sections like this:

is a node class Which represents a node in your tree. It stores the class that shows it and its direct children.

  square node {set   

Then you can build the tree, and you can get your root node.

  list & lt; Class & gt; ClassList = ... l Maps & lt; Class, node & gt; Class mark = ... one of the all the classrooms in the nodes made from them; Node routerode = null; For (class C: classlist) {node parentonode = clamsap.gate (cgs supercarclass ()); If (parentNode! = Null) parentNode.children.add (classMap.get (c)); Else Route Node = classMap.get (c); }    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -