-
Notifications
You must be signed in to change notification settings - Fork 14
V2 attributes #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
V2 attributes #28
Conversation
| import java.util.Map; | ||
| import java.util.function.Function; | ||
|
|
||
| public class Attributes extends HashMap<String, Object> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What were your inspirations for API design?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted:
- typed getters like
getInt,getList, andgetAttributesto avoid unsafe casting in user code - an Attributes builder with add (or set) and delete.
Maybe Attributes.of or Attributes.builder().add(...) would be more idiomatic for Java.
Do you have suggestions or preferences on how the API could be improved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be useful to consider how user-libraries, such as an OME-Zarr library, would want to access the attributes. Maybe they just want to take the ome (0.5) or multiscales (0.4) objects and parse for themselves.
array.resize