[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 |
||
| 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: |