Example usage for java.util.concurrent CopyOnWriteArrayList sort

List of usage examples for java.util.concurrent CopyOnWriteArrayList sort

Introduction

In this page you can find the example usage for java.util.concurrent CopyOnWriteArrayList sort.

Prototype

public void sort(Comparator<? super E> c) 

Source Link

Usage

From source file:edu.temple.cis3238.wiki.vo.TopicVO.java

/**
 *
 * @param tagsCollection/*from  w  ww . j  av  a  2  s  .  c om*/
 */
public void setTagsCollection(CopyOnWriteArrayList<TagsVO> tagsCollection) {
    if (tagsCollection != null && !tagsCollection.isEmpty()) {
        this.tagsCollection = new CopyOnWriteArrayList<TagsVO>();
        tagsCollection.sort(new TagsVO());
        this.tagsCollection.addAll(tagsCollection);
    }
}