Set the tags. It will remove all previous tags first.

@param tags the tag list to set.
329071
public void setTags(String... tags) {
        removeAllViews();
        for (final String tag : tags) {
            appendTag(tag);
        }

        if (isAppendMode) {
            appendInputTag();
        }
    }
1234544
public R setTags(List<String> tags) {
        JsonArray jsonArray = new JsonArray();
        for (String s : tags) {
            jsonArray.add(s);
        }
        mBodyMap.put(BoxItem.FIELD_TAGS, jsonArray);
        return (R) this;
    }
989020
public void setTagDescriptions(java.util.Collection<TagDescription> tagDescriptions) {
        if (tagDescriptions == null) {
            this.tagDescriptions = null;
            return;
        }

        this.tagDescriptions = new com.amazonaws.internal.SdkInternalList<TagDescription>(tagDescriptions);
    }
1373301
public function set_tags($tags) {
        $this->tags = [];
        foreach ($tags as $tag) {
            // We use $tag->id as the key for the array so not only it handles duplicates of the same tag being given,
            // but also it is consistent with the behaviour of set_tags_by_id() below.
            $this->tags[$tag->id] = $tag;
        }
    }
530659
public void setTagValues(java.util.Collection<String> tagValues) {
        if (tagValues == null) {
            this.tagValues = null;
            return;
        }

        this.tagValues = new java.util.ArrayList<String>(tagValues);
    }
1223118
public InputSecurityGroup withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
508255
public Tags and(@Nullable Tag... tags) {
        if (tags == null || tags.length == 0) {
            return this;
        }
        Tag[] newTags = new Tag[last + tags.length];
        System.arraycopy(this.tags, 0, newTags, 0, last);
        System.arraycopy(tags, 0, newTags, last, tags.length);
        return new Tags(newTags);
    }
309708
public void setTargetTags(java.util.Collection<String> targetTags) {
        if (targetTags == null) {
            this.targetTags = null;
            return;
        }

        this.targetTags = new java.util.ArrayList<String>(targetTags);
    }
986044
public final void setTags(Map<String, String> tags) {
        Map<String, String> updatedTags = new TreeMap<>();

        if (tags != null) {
            for (Map.Entry<String, String> entry : tags.entrySet()) {
                String key = entry.getKey();

                requireArgument(!Metric.ReservedField.isReservedField(key), MessageFormat.format("Tag {0} is a reserved tag name.", key));
                updatedTags.put(key, entry.getValue());
            }
        }
        _tags.clear();
        _tags.putAll(updatedTags);
    }
725750
public void setComments(String tag, List<String> comments) {
        String nt = normaliseTag(tag);
        if(this.comments.containsKey(nt)) {
            this.comments.remove(nt);
        }
        this.comments.put(nt, comments);
    }
1303883
public void setTagOptions(java.util.Collection<TagOptionDetail> tagOptions) {
        if (tagOptions == null) {
            this.tagOptions = null;
            return;
        }

        this.tagOptions = new java.util.ArrayList<TagOptionDetail>(tagOptions);
    }
154709
public function setTagsAttribute($tags)
    {
        if (! $this->exists) {
            $this->queuedTags = $tags;

            return;
        }

        $this->tag($tags);
    }
1298785
@SuppressWarnings("unchecked")
    public T addTags(List<String> tags) {
        if (this.tags_ == null) {
            tags_ = new ArrayList<>();
        }
        this.tags_.addAll(tags);
        return (T) this;
    }
1273213
public void addTag(String tag) {
        if (this.tags == null) {
            tags = new ArrayList<String>();
        }
        this.tags.add(tag);
    }
670398
public ResourceTags withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
209614
public DescribeRobotResult withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
661873
public void setTags(java.util.Collection<String> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<String>(tags);
    }