If your list of property variables is a known object, since it will have the largest X-value, and I know what type of value each of them will have, then, of course, the first approach will make the most sense. In this situation, as @Tomas noted in his answer, it is preferable. You do not have to worry about type safety.
However, if your object has a set of properties, and then should have a list of other things of a different type and a different number, then a HashMap may make sense. There are some things to keep in mind.
First indicate the types as well as possible. For instance:
HashMap<String,Object> myHash = new HashMap<String, Object>();
If you created this way, your hashmap keys should ALWAYS be a string. If you are dealing with things that are called dynamically, this can be a good way. You will notice that I am only specifying Object. Because of this, you can save any type of object, and if you want to save primitives, you need to do it with them as Integer, Double, String, ect., Not int, double, string.
Then the stressful part of structuring, like this one, is that you will need to display and check the types and be prepared to solve it. When you pull out pieces of information, you need to do something like this:
if myHash.get(key) instanceof Integer Integer myVal = (Integer) myHash.get(key); else if myHash.get(key) instanceof Double Double myVal = (Double) myHash.get(key);
Then you will need to check the type and throw when outputting the values, and then send them to new methods / logic based not only on the name of the property, but also on the type of the object. There are some really useful things you can do this way ... but it can be hard to do without painting yourself in an overly complex corner. Especially if the Java reflection api can be used to dynamically enhance properties (but not without its own headaches).