1

Does java have a Data type that is similar to QVariant without using the java qt binding?

I want to have a Map< String, QVariant> so that I can have different data types for each value in the container.

Does JAVA have this?

P.S. JAVA noob!

MWright
  • 1,681
  • 3
  • 19
  • 31
  • No there isn't... Could be written but good luck with that. Do you mean to say values do not even have a common base type other than `Object`? – fge Jul 12 '13 at 15:24

1 Answers1

2

I am pretty sure what you are looking for is Object, the "mother of all classes". Use a Map<String, Object> and every value in the map can have a different type.

winne2
  • 2,188
  • 2
  • 17
  • 13