I'm currently programming something where I'm paying a lot of attention to performance and ram usage.

I came wondering with this problem, and I was trying to make a decision. Imagine this situation:

I need to associate a certain Class (Location) and a Integer to a String (let's say a name). So a Name has an Id and a Location....

What would be the best approach to this?

First: Create two hashmaps

```
HashMap<String, Location> one = new HashMap<String, Location>
HashMap<String, Integer> two = new HashMap<String, Integer>

```

Second: Use only one hashmap and create a new class

```
HashMap<String, NewClass> one = new HashMap<String, NewClass>

```

where NewClass contains:

```
class NewClass {

    Location loc;
    Integer int;
}

```