Code example for TreeSet

0
 * @author John Ericksen 
 */ 
public class MergeableTags { 
 
    // TreeSet used for tag order 
    private final Set<String> tags = new TreeSet<String>();
 
    public MergeableTags() { 
        //empty bean constructor 
    } 
 
    public MergeableTags(Set<String> tags) {
        this.tags.addAll(tags);
    } 
 
    public Set<String> getTags() {
        return tags;
    } 
}