While trying to work out how to access indexes via Scala, I had a lot of trouble getting the result of StringBinIndex.named("example") to work with the parameterised riakObject.getIndex method.
After discussion on a Scala list, several Java devs said that the problem stems from the RiakIndex type signature being incorrect.
Instead of:
public <V extends RiakIndex, T extends RiakIndex.Name<V>> V getIndex(T name)
It should be:
public <V extends RiakIndex<?>, T extends RiakIndex.Name<V>> V getIndex(T name)
I myself am not a strong Java dev and so am not able to verify this, but I thought I should forward it along.