Code example for HashSet

Methods: isEmpty

0
    } 
 
    /* ------------------------------------------------------------ */ 
    public boolean isEmpty() 
    { 
        return _entrySet.isEmpty();
    } 
 
    /* ------------------------------------------------------------ */ 
    public boolean containsKey(Object key)
    { 
        if (key==null)
            return _nullEntry!=null;
        return 
            getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
    } 
     
    /* ------------------------------------------------------------ */ 
    public void clear() 
    { 
        _root=new Node();