-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify EntityStore#{get,getFieldValue} methods. (#5772)
When I originally wrote this code, I was motivated to keep the get and getFieldValue methods separate because they had different return types. Method signature overloading solves that problem using just the type system, so we can have one method implementation rather than two. At the same time, I was able to eliminate unnecessary inheritance and method overriding in the Layer subclass by using an instanceof check in EntityStore#get.
- Loading branch information
Showing
4 changed files
with
23 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters