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

enums: allow custom to string implementations #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 14, 2019

  1. enums: allow custom to string implementations

    As per the [enum spec](https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html)
    * name() is final and can't change. It refers to the exact defined name of the constant, as declared in the enum.
    * toString() is arbitrary and can be developer overridden. It defaults to name()
    
    So, this should use name() instead of toString(), in-case a developer (today, me) overrides the toString of an enum.
    dirkredeye authored Oct 14, 2019
    Configuration menu
    Copy the full SHA
    6ae6570 View commit details
    Browse the repository at this point in the history