@Override
    public Object clone() {
        @SuppressWarnings("unchecked") // safe (result of clone)
        OrderedHashSet<T> dup = (OrderedHashSet<T>)super.clone();
        dup.elements = new ArrayList<T>(this.elements);
        return dup;
    }
Return the List holding list of table elements.  Note that you are
 NOT getting a copy so don't write to the list.
runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java