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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -