FileDocCategorySizeDatePackage
ASSet.javaAPI DocGlassfish v2 API4154Fri May 04 22:35:54 BST 2007com.sun.enterprise.server.ss.util

ASSet

public class ASSet extends Object implements Set
When nio application uses Selector.selectedKeys(), ASSelector will return a ASSet instance, where it will wrap those selection keys used for OP_ACCEPT. Nio application might use Set.iterator() to remove the processed SelectionKey from the selectedSet. We provide a wrapper Iterator so that even the actual selectedSet in the Selector is modified.
see
ASSelector

Fields Summary
private Set
set
private ASWrapperCreator
wCreator
Constructors Summary
public ASSet(Set set, ASWrapperCreator wCreator)


         
        this.set = set;
        this.wCreator = wCreator;
    
Methods Summary
java.util.SetactualSet()

        return set;
    
public booleanadd(java.lang.Object obj)

        return set.add(obj);
    
public booleanaddAll(java.util.Collection c)

        return set.addAll(c);
    
public voidclear()

        set.clear();
    
public booleancontains(java.lang.Object obj)

        return set.contains(obj);
    
public booleancontainsAll(java.util.Collection c)

        return set.containsAll(c);
    
public booleanequals(java.lang.Object obj)

        return set.equals(obj);
    
public inthashCode()

        return set.hashCode();
    
public booleanisEmpty()

        return set.isEmpty();
    
public java.util.Iteratoriterator()

        return new ASIterator(this);
    
public booleanremove(java.lang.Object obj)

        return set.remove(obj);
    
public booleanremoveAll(java.util.Collection c)

        return set.removeAll(c);
    
public booleanretainAll(java.util.Collection c)

 
        return set.retainAll(c);
    
public intsize()

        return set.size();
    
public java.lang.Object[]toArray()

        return set.toArray();
    
public java.lang.Object[]toArray(java.lang.Object[] a)

        return set.toArray(a);
    
java.lang.ObjectwrapIfNecessary(java.lang.Object next)

        return wCreator.wrapIfNecessary(next);