Code example for Set

Methods: toArray

0
    public Iterator<T> iterator() {
        return elements.iterator();
    } 
 
    public Object[] toArray() { 
        return elements.toArray();
    } 
 
    public <A> A[] toArray(A[] a) {
        return elements.toArray(a);
    } 
 
    public boolean add(T t) {
        throw new UnsupportedOperationException();
    } 
 
    public boolean remove(Object o) { 
        throw new UnsupportedOperationException();
    }