public Set tokens() {
        if (tokenSet == null) {
            tokenSet = new AbstractSetView() {
                public long size() {
                    return inMemoryManagedObjects.size();
                }

                public Iterator iterator() {
                    final java.util.Iterator tokenIterator = inMemoryTokens.values().iterator();
                    return new Iterator() {

                        public boolean hasNext()
                        {
                            return tokenIterator.hasNext();
                        } // hasNext().

                        public Object next()
                        {
                            return tokenIterator.next();
                        } // next().

                        public boolean hasNext(Transaction transaction)
                                        throws ObjectManagerException
                        {
                            throw new UnsupportedOperationException();
                        } // hasNext().

                        public Object next(Transaction transaction)
                                        throws ObjectManagerException
                        {
                            throw new UnsupportedOperationException();
                        } // next().

                        public Object remove(Transaction transaction)
                                        throws ObjectManagerException
                        {
                            throw new UnsupportedOperationException();
                        } // remove().               
                    }; // new Iterator().
                } // iterator().  
            }; // new AbstractSetView().
        } // if (tokenSet == null). 
        return tokenSet;
    }
public Set tokens ( ) { if ( tokenSet == null ) { tokenSet = new AbstractSetView ( ) { public long size ( ) { return inMemoryManagedObjects . size ( ) ; } public Iterator iterator ( ) { final java . util . Iterator tokenIterator = inMemoryTokens . values ( ) . iterator ( ) ; return new Iterator ( ) { public boolean hasNext ( ) { return tokenIterator . hasNext ( ) ; } public Object next ( ) { return tokenIterator . next ( ) ; } public boolean hasNext ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } public Object next ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } public Object remove ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } } ; } } ; } return tokenSet ; }
/*
(non-Javadoc)

@see com.ibm.ws.objectManager.ObjectStore#tokens()