Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8851195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:05:39+00:00 2026-06-14T13:05:39+00:00

Does anyone have thoughts on what’s superior, EnumMap or Properties (or at least in

  • 0

Does anyone have thoughts on what’s superior, EnumMap or Properties (or at least in my situation?) I am using a 3rd party software package that communicates between my code and their application using their method like so:

TheirRuntime.getInstance().getParameter(String paramName)

Currently I have created an enum that works like this:

public enum MyEnum {
    FOO_BAR ("fooBar"), BAZ_QUUX ("bazQuux");

    private final String varName;
    private MyEnum(String varName) {
        this.varName = varName();
    }
    public String varName() {
        return varName();
    }
}

Then I store the values in an EnumMap<MyEnum, Double>, which gets updated when the user changes something. My architecture is slightly more complicated than this but I’m omitting some details for the sake of SSCCE. Though I will mention that I load the values with something like:

for (MyEnum me : MyEnum.values()) {
     TheirRuntime.getInstance().getParameter(me.varName());
}

What I’m wondering is, would it make more sense to use Properties? This question has come up because I’m trying to build a test framework that doesn’t involve the 3rd party software at all, and I’m trying to figure a good, easy way to load the parameters that doesn’t use any 3rd party API calls, and a Properties file seems an easy way to go, which makes me wonder if I should just use Properties in the main class.

Thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:05:40+00:00Added an answer on June 14, 2026 at 1:05 pm

    Benefits of Enum are clear:
    It provides you enum literals. You can use them to catch “wrong key” issues at compilation level.
    Properties allow you flexibility – for example – you can read them from a file.
    The big question is – how sure are you that the set of literals provided by the enum is fixed, and will not change?
    For example, our system has a set of enum values, and since we’re an open source project, we would like to build a plugin on top of it that theoretically should have used the enum values,
    But plugin writers will not be able to use the original enum, as it has a fix set of literals, so either we modify our enum to a properties object, and let plugin writers register their “literals”,
    or we have to provide a supplementary system to our enum.
    I’m sorry that I don’t have a “clear cut” solution here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any thoughts on this method? I have did some performance testing
Does anyone have any thoughts about making Simile read data from a database without
Does anyone have any thoughts on passing full objects as variables as opposed to
Does anyone have a translate function for x/y positions after rotation in javascript? for
Does anyone have recommendations on the best Online Store for non-technical users of Joomla?
Does anyone have an idea on where is it best to upload a PHP
Does anyone have any examples on how to integrate a task scheduler in Bottle.
Does anyone have an idea of how to capture logs continuously and update a
does anyone have a nice solution to get de price wich is a variable
Does anyone have examples on how to create a Datatablest filter checkbox? I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.