Code example for Collection

Methods: equals

0
        if (obj == null) return false;
        if (getClass() != obj.getClass()) return false;
        final MenuItem other = (MenuItem) obj;
        if (categories == null) {
            if (other.categories != null) return false;
        } else if (!categories.equals(other.categories)) return false;
        if (name == null) {
            if (other.name != null) return false;
        } else if (!name.equals(other.name)) return false;
        return true; 
    } 
 
}