public void makeImmutable ( ) { if ( ! isImmutable ) { // Note: There's no need to wrap the entryList in an unmodifiableList // because none of the list's accessors are exposed. The iterator() of // overflowEntries, on the other hand, is exposed so it must be made // unmodifiable. overflowEntries = overflowEntries . isEmpty ( ) ? Collections . < K , V > emptyMap ( ) : Collections . unmodifiableMap ( overflowEntries ) ; isImmutable = true ; } }
Make this map immutable from this point forward .