I have a custom class that looks like below:
public class customClass(){
    private int keyCode;
    private boolean up;
    private String toTrigger;
    public String getTrigger();
    public boolean up();
    public int keyCode();
}
Whats the best way for performance to have a list of unique values?
I was thinking of a HashSet but how would i make sure its only unique instances of my customClass?
What do i need to override? Equals and HashCode? will that make sure that my Hash Set of CustomClass only have unique instances?
Thanks
 
    