maintaining TreeSet sort as object changes value

Posted by Stevko on Stack Overflow See other posts from Stack Overflow or by Stevko
Published on 2010-04-05T17:00:24Z Indexed on 2010/04/05 17:03 UTC
Read the original article Hit count: 247

Filed under:
|

I've got a object that defines a 'natural sort order' using Comparable<>. These are being stored in TreeSets.

Other than removing and re-adding the object, is there another way to update the sort when the members that are used to define the sort order are updated?

© Stack Overflow or respective owner

Related posts about java

Related posts about collections