spdx / Spdx-Java-Library

Java library which implements the Java object model for SPDX and provides useful helper functions
Apache License 2.0
37 stars 36 forks source link

Add API to return licenses as a map in addition to list #237

Open dwalluck opened 6 months ago

dwalluck commented 6 months ago

I see that the license list is actually using a map internally, but the API returns a list Map::values(). Is it possible to add an API which also returns a Map with key String licenseId and value SpdxListedLicense? This would be more performant rather than having to recreate a map from the list.

goneall commented 6 months ago

Sounds like a useful API - if you'd like to create a PR, I can review merge. Otherwise, I'll take a look at this after implementing the SPDX 3.0 support.