Java how to manage user-defined variables
问题 I'm developing some software where I'd like to allow the user to create and manage their own variables. I'd like to give the user the ability to create doubles, integers, and strings, and then manually set their values (all of this will be done through a UI). Right now I'm trying to decide on a model that would manage all of these user-defined variables. My first thought was that it would be nice to have a Map that fetches variables by their name and use a "one-size-fits-all" 'Variable' class