[YANGTOOLS-621] yang-model-api: introduce interfaces for specific integer types Created: 09/Jun/16 Updated: 10/Apr/22 Resolved: 20/Nov/17 |
|
| Status: | Verified |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.0 |
| Type: | Bug | ||
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6033 |
| Description |
|
Some users have a need to check for specific subclass of an IntegerTypeDefinition, e.g. int8, int16. This is currently implemented by walking up the type tree to see what the root type is – which is inefficient, considering this could reasonably be achieved via an instanceof check. Introduce Int8TypeDefinition and friends and implement them in yang-model-util. For Restricted and Derived types this requires appropriate subclasses and instanceof dispatch when we build the type. |
| Comments |
| Comment by Robert Varga [ 02/Nov/17 ] |