Wednesday, April 20, 2011

A new light

So after discussing a little more with Dr. Bowring, I changed the complexDataObject so that it contains a static arrayList of complexDataObjects and anytime one is created it is added to the array. The insertion is sorted to allow faster sorting using a comparator class. So after all that is done, the methods become a lot easier. For public boolean supportsView(String view) I do a search through the static arrayList for a object that has title of the string view. Returns true if the view is found else returns false. For public String[] getSupportedViews() I had to modify it to return an arrayList instead of an array and then I created a copy of the static arrayList of complexData and then return it.

No comments:

Post a Comment