gchq / MagmaCore

Magma Core is a collection of Java Classes and utilities to enable HQDM objects and patterns to be created and consumed as RDF Linked Data.
Apache License 2.0
26 stars 4 forks source link

Replace large switch statement with a lookup table. #212

Open twalmsley opened 7 months ago

twalmsley commented 7 months ago

Closes #211

For discussion, but this looks better to me than the original switch statement. Feel free not to merge if you disagree :-)

Hopefully it will also be more efficient since it removes a large cascading if...else... construct (depending on compiler optimisations of course).