0

In Java Properties, can you use property substitutions in the property keys of the other property key names?

Something like this:

between=Between
and=and
greater.than=Greaterthan
${between}1${and}4Units=1-4
${between}5${and}8Units=5-8
${between}9${and}20Units=9-20
${between}21${and}50Units=21-50
${between}51${and}99Units=51-99
${greater.than}100Units=100-999
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152

1 Answers1

0

Commons Configuration supports property substitution (or properties referencing another property) through values. There is no current support for substituting key names in properties. However, the least you can do is to extend the implementation by creating a custom property reader to achieve what you're trying to do.

Read on the ff. references:

Ish
  • 3,992
  • 1
  • 17
  • 23