@Override
    public boolean equals(Object o)
    {
        boolean isEqual = false;
        if(o != null && o instanceof FoodGenre)
        {
            FoodGenre temp = (FoodGenre) o;
            if(temp.getCode() == this.getCode())
            {
                isEqual = true;
            }
        }
        else if(o != null && o instanceof String)
        {
            String temp = (String) o;
            if(temp.equals(this.name))
            {
                isEqual = true;
            }
        }
        return isEqual;
    }