code: 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);
          }
      }
docs: Set the default direction for all index properties.
  
  @param defaultDirection replace unspecified property directions with this