Skip to content
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

MapFactoryInterface Creates Maps Instead of Containers #30

Open
XedinUnknown opened this issue Sep 21, 2024 · 0 comments
Open

MapFactoryInterface Creates Maps Instead of Containers #30

XedinUnknown opened this issue Sep 21, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@XedinUnknown
Copy link
Member

XedinUnknown commented Sep 21, 2024

Problem

The name MapFactoryInterface suggests that its implementations create maps, i.e. MapInterface instances.
However, it only promises to create vanilla containers, which makes it no more useful than the ContainerFactoryInterface which it extends.

WritableMapFactoryInterface has a similar problem.

Solution

⚠️ This may have unexpected consequences for consumers.

  • Change the return type of MapFactoryInterface#createContainerFromArray() to MapInterface.
  • Change the return type of WritableMapFactoryInterface#createContainerFromArray() to WritableMapInterface.
@XedinUnknown XedinUnknown added this to the v0.4 milestone Sep 21, 2024
@XedinUnknown XedinUnknown self-assigned this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant