code: public StorableIndex<S> addProperty(StorableProperty<S> property, Direction direction) {
          for (int i=mProperties.length; --i>=0; ) {
              if (mProperties[i].equals(property)) {
                  return this;
              }
          }
  
          StorableProperty<S>[] properties = new StorableProperty[mProperties.length + 1];
          Direction[] directions = new Direction[mDirections.length + 1];
  
          System.arraycopy(mProperties, 0, properties, 0, mProperties.length);
          System.arraycopy(mDirections, 0, directions, 0, mDirections.length);
  
          properties[properties.length - 1] = property;
          directions[directions.length - 1] = direction;
  
          return new StorableIndex<S>(properties, directions, mUnique, mClustered, false);
      }
docs: Returns a StorableIndex with the given property added. If this index
  already contained the given property (regardless of sort direction),
  this index is returned.
  
  @param property property to add unless already in this index
  @param direction direction to apply to property, if added
  @return new index with added property or this if index already contained property