It's all about the answers!

Ask a question

Sorting a collection of FileItemHandles


Steven Hovater (10921) | asked Mar 30 '20, 1:02 p.m.
hi all
For reasons I won't go into, consider that I have a collection of FileItemHandles, representing the versions of a set of files. As such, for a given itemId, there may be multiple stateIds. End goal is a collection sorted first by the itemId and second by the stateId.

What's a good way to sort this collection? I'm thinking of a TreeSet with a custom comparator.
Is there a better way?

thanks,
Steve

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.