public FilterableSet < Entry < K , V > > allEntrySet ( ) { if ( setOfAllEntries == null ) { setOfAllEntries = new AbstractFilterableSet < Entry < K , V > > ( ) { @ Override public Iterator < Entry < K , V > > iterator ( ) { return new TransactionalBidiTreeMapIterator < Entry < K , V > > ( KEY ) { @ Override protected Entry < K , V > doGetNext ( ) { return lastReturnedNode ; } @ Override protected Node < K , V > getNextValidNode ( Node < K , V > node , String thread_id ) { return node ; } } ; } //cannot have contains or remove methods //as we have ALL the nodes and so may have duplicates //which are in the provess of being deleted @ Override public boolean contains ( Object o ) { throw new UtilsjException ( "method not supported" ) ; } @ Override public boolean remove ( Object o ) { throw new UtilsjException ( "method not supported" ) ; } @ Override public int size ( ) { return TransactionalBidiTreeMap . this . size ( true ) ; } @ Override public void clear ( ) { TransactionalBidiTreeMap . this . clear ( ) ; } } ; } return setOfAllEntries ; }
It is very rare that this method would be required . You probably want to use entrySet instead . This method returns all Entry s in this Map no matter what its transactional status .