> 
> **Question:** How do you create a custom HashMap class, extending HashMap, that can be manipulated like normal?
> 
> 
> 

Let me explain. According to [this question](https://stackoverflow.com/questions/43227956/custom-method-for-arraylist), you can create custom methods with ArrayLists by extending ArrayList and then writing your method. How would I do that with HashMaps?

I want to create a UserList class that can be initialized with `UserList users = new HashMap<Users, Integer>`. This is my class for UserList so far:

```
public class UserList extends HashMap<Users, Integer> {

    public Users getUser(UUID uuid) {
        for (Users u: keySet()) {
            if (u.getUuid().equals(uuid))
                return u;
        }

        return null;
    }

    public Boolean containsPlayer(UUID uuid) {
        for (Users u: keySet()) {
            if (u.getUuid().equals(uuid))
                return true;
        }

        return false;
    }

    public Users removeUser(UUID uuid) {
        for (Users u: keySet()) {
            if (u.getUuid().equals(uuid)) {
                remove(u);
                return u;
            }
        }

        return null;
    }
}

```

But whenever I type private `UserList listOfUsers = new HashMap<Users, Integer>;` in the main class, it brings up an incompatible type error. How do I fix this? I remember learning about this before, but I've since forgotten.

Thanks