Code example for Collection

Methods: remove

0
    public void addAttribute(String attribute) {
        attributes.add(attribute);
    } 
 
    public void removeAttribute(String attribute) {
        attributes.remove(attribute);
    } 
     
    public void setAttributes(Collection<String> attributes) {
        if (this.attributes == attributes) return;
        this.attributes.clear();
        if (attributes == null) return;
        this.attributes.addAll(attributes);
    } 
 
    public void setAttributes(String[] attributes) {
        this.attributes.clear();
        if (attributes == null) return;
        this.attributes.addAll(Arrays.asList(attributes));
    } 
Experience pair programming with AI  Get Codota for Java