Enrich access to evaluator's variables#22
Conversation
|
@JaredDavis22 How would you feel about a new method: public Map<String, Object> getVars() {
return Collections.unmodifiableMap(vars);
}You could then of course call |
|
As usual, I'm just waffling on naming. Do you like |
|
getVars() approach works for me as well. Did the getNames approach allow for direct manipulation of the map? Was the direct manipulation comment justification for the Collections.modifiableMap wrapper? getAll() seems better. Is there a way to clear the map? setAll adds to existing map. getAll() and clear() ? |
|
Yeah, the direct manipulation comment was about returning a read-only map wrapper. I agree that A |
|
adding remove does make sense. Let me add that. What about testing/test cases? |
|
I just whipped up some tests for |
|
All set now |
Co-authored-by: Curtis Rueden <ctrueden@wisc.edu>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Curtis Rueden <ctrueden@wisc.edu>
Signed-off-by: Curtis Rueden <ctrueden@wisc.edu>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@JaredDavis22 Thank you for contributing! I've released parsington 3.2.0 to Maven Central with these improvements. 🍻 |
|
Wow - that was fast. Thanks for the great project! |
Small change to allow discovery of variable names.