code: public <V extends RiakIndex<?>, T extends RiakIndex.Name<V>> V getIndex(T name)
      {
          RiakIndex<?> existing = indexes.get(name.getFullname());
          if (existing != null)
          {
              return name.wrap(existing).createIndex();
          }
          else
          {
              V newIndex = name.createIndex();
              existing = indexes.putIfAbsent(newIndex.getFullname(), newIndex);
              if (existing != null)
              {
                  return getIndex(name);
              }
              else
              {
                  return newIndex;
              }
          }
      }
docs: Get the named RiakIndex
  <p>
  If the named index does not exist it is created and added to the container
  before being returned.
  </p>
  <p>Scala Users: to chain RiakIndex method calls off of this method
  please include explicit type parameters for the getIndex() call.
  e.g.
  </p>
  <blockquote><pre>
  riakIndexes.getIndex[StringBinIndex,StringBinIndex.Name](StringBinIndex.named("myindex")).add("myvalue")
  </pre></blockquote>
  @param name The {@link RiakIndex.Name} of the index to retrieve.
  @return The requested index typed accordingly.