Glad you got it working. Actually, I feel my argument about the way the tree can be organized and why you are encountering your issue was pretty descent as well ;)
Don't mean to belabor the...
Type: Posts; User: copeg
Glad you got it working. Actually, I feel my argument about the way the tree can be organized and why you are encountering your issue was pretty descent as well ;)
Don't mean to belabor the...
Every time you add to a Tree set it takes log(n) time, so to add everthing is n*log(n), the same as Collections.sort takes (the additions to the end of a List in theory take constant time O(1)...
Again I suggest to read the API, as I would say this is a mis-use of a TreeSet (unless I misunderstand the goal at hand). A Set should be used if you want unique elements (based upon the...
See the API for TreeSet
If all you want is to order the Layers, I'd add them to a List then use Collections.sort to sort the List - a Set should only be used when you want unique elements...