java - Annotation based data structure visualization - are there similar tools out there? -


I plan to create an annotation based device for imagery / play with a data structure .

This is my view:

Students who want to try their own written data structures, they need it:

  • Types of their data structure Some types of marker annotations e.g.

      @list public class MyList & lt; E & gt; {...}  

    so that I know to represent the data structure

  • There is a need to provide an iterator so that I The element in the correct order can be retrieved

  • The methods for annotating and removing methods need to be annotated, for example

      @ public Enter Boolean (EE) {...}  

    so that I can "tie" that button in some buttons.

Are there similar applications? I was walking a little bit, but I could not find anything.

Why do not I really understand that you need to use annotations for such a task? You will end up with some weird methods that will not be able to parse your structure, or it will parse it incorrectly - you are brought to create a set of rules that how to properly write these systems so that your structure Understand them

I think this is a better solution for using the interface instead. With methods like GetIterator, getIndex, etc., call scholarships or something else to their own interface, and students apply this interface. Then you can load any load from that class and use it on the basis of the interface that they use.

In addition, you can only reuse the avialable interface, such as a list or archive, however, it can write a lot to students, so to apply the interface of unused code I write my own interface Want to go

An example of such an interface would be:

  Interface Student List & lt; T & gt; {Public Eaterware & lt; T & gt; GetIterator (); Public T Index (index); Add Public Zero (T element); Public Zero Removal (T element); }  

Students will implement it in this way (this example only wraps around the ALEIS):

  class < T & gt; Uses student list & lt; T & gt; {Private Arrestist & lt; T & gt; RealList; Public Milestone () {realList = New Arrestist & lt; T & gt; (); } Public Zero Joint (T element) {realList.add (element); } .......}  

and you will test it like this:

  zero test list (student list & lt; string & Gt; list) {add to list (5); List.add (10); List.get (20); } TestList (new milestone & lt; string & gt; ());  

Everything is clear for students and for you in this way.


Comments