Example usage for org.apache.commons.collections SetUtils orderedSet

List of usage examples for org.apache.commons.collections SetUtils orderedSet

Introduction

In this page you can find the example usage for org.apache.commons.collections SetUtils orderedSet.

Prototype

public static Set orderedSet(Set set) 

Source Link

Document

Returns a set that maintains the order of elements that are added backed by the given set.

Usage

From source file:org.quartz.JobDetail.java

public Object clone() {
    JobDetail copy;/*from w  w  w  . ja  v  a2  s. co  m*/
    try {
        copy = (JobDetail) super.clone();
        copy.jobListeners = SetUtils.orderedSet(new HashSet());
        copy.jobListeners.addAll(jobListeners);
        if (jobDataMap != null) {
            copy.jobDataMap = (JobDataMap) jobDataMap.clone();
        }
    } catch (CloneNotSupportedException ex) {
        throw new IncompatibleClassChangeError("Not Cloneable.");
    }

    return copy;
}