public Iterator<SymbolTable> iterator()
    {
        ArrayList<SymbolTable> tables;

        synchronized (myTablesByName)
        {
            tables = new ArrayList<SymbolTable>(myTablesByName.size());

            // I don't think we can shorten the synchronization block
            // because HashMap.values() result is a live view (not a copy) and
            // thus needs to be synched too.
            Collection<TreeMap<Integer, SymbolTable>> symtabNames =
                myTablesByName.values();
            for (TreeMap<Integer,SymbolTable> versions : symtabNames)
            {
                synchronized (versions)
                {
                    tables.addAll(versions.values());
                }
            }
        }

        return tables.iterator();
    }
public Iterator < SymbolTable > iterator ( ) { ArrayList < SymbolTable > tables ; synchronized ( myTablesByName ) { tables = new ArrayList < SymbolTable > ( myTablesByName . size ( ) ) ; Collection < TreeMap < Integer , SymbolTable > > symtabNames = myTablesByName . values ( ) ; for ( TreeMap < Integer , SymbolTable > versions : symtabNames ) { synchronized ( versions ) { tables . addAll ( versions . values ( ) ) ; } } } return tables . iterator ( ) ; }
Constructs an iterator that enumerates all of the shared symbol tables
in this catalog, at the time of method invocation. The result represents
a snapshot of the state of this catalog.

@return a non-null, but potentially empty, iterator.