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

Add support to enum types #125

Merged
merged 1 commit into from
May 18, 2023
Merged

Add support to enum types #125

merged 1 commit into from
May 18, 2023

Conversation

oswaldobapvicjr
Copy link
Owner

@oswaldobapvicjr oswaldobapvicjr commented May 18, 2023

The ParseFactory may perform parsing of Enum elements which can be retrieved based on their constant names, performing case-insensitive matching of the name.

For example:

ParseFactory.parse(Month.class, "january");    // returns Month.JANUARY
ParseFactory.parse(DayOfWeek.class, "friday"); // returns DayOfWeek.FRIDAY

So the mappers PropertiesToObjectMapper<T> and INIToObjectMapper<T> may benefit from it by populating enum fields.

@oswaldobapvicjr oswaldobapvicjr self-assigned this May 18, 2023
@oswaldobapvicjr oswaldobapvicjr added the enhancement New feature or request label May 18, 2023
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #125 (26d6401) into master (154244c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #125   +/-   ##
=========================================
  Coverage     99.26%   99.26%           
- Complexity      426      428    +2     
=========================================
  Files            67       67           
  Lines           811      812    +1     
  Branches         54       54           
=========================================
+ Hits            805      806    +1     
  Misses            5        5           
  Partials          1        1           
Impacted Files Coverage Δ
...in/java/net/obvj/confectory/util/ParseFactory.java 100.00% <100.00%> (ø)

@oswaldobapvicjr oswaldobapvicjr merged commit 6a900b9 into master May 18, 2023
5 checks passed
@oswaldobapvicjr oswaldobapvicjr deleted the issue/0125 branch May 18, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant