[YANGTOOLS-126] QName should define a total ordering Created: 01/Apr/14  Updated: 10/Apr/22  Due: 04/Apr/14  Resolved: 04/Apr/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Robert Varga Assignee: Martin Vitez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

It seems to be very convenient to use QNames instead of strings for keys. Unfortunately this breaks as soon as we want to start comparing maps keyed by QNames, as there is no total ordering. A workaround of using QName.toString() exists, as well as defining an external comparator, but it would be very nice if QName were to implement Comparable<QName>.



 Comments   
Comment by Martin Vitez [ 02/Apr/14 ]

Proposed patch:

https://git.opendaylight.org/gerrit/#/c/5861/

Generated at Wed Feb 07 20:52:20 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.