public void setDefaultDirection ( Direction defaultDirection ) { // Apply default sort direction to those unspecified. if ( defaultDirection != Direction . UNSPECIFIED ) { Map < StorableIndex < S > , StorableIndex < S > > replacements = null ; for ( StorableIndex < S > index : this ) { StorableIndex < S > replacement = index . setDefaultDirection ( defaultDirection ) ; if ( replacement != index ) { if ( replacements == null ) { replacements = new HashMap < StorableIndex < S > , StorableIndex < S > > ( ) ; } replacements . put ( index , replacement ) ; } } replaceEntries ( replacements ) ; } }
Set the default direction for all index properties .