Search:

Type: Posts; User: copeg

Search: Search took 0.07 seconds.

  1. Re: TreeSet contains(obj) doe not behave as expected

    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...
  2. Re: TreeSet contains(obj) doe not behave as expected

    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)...
  3. Re: TreeSet contains(obj) doe not behave as expected

    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...
  4. Re: TreeSet contains(obj) doe not behave as expected

    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...
Results 1 to 4 of 4