Shell Sort algorithm in java, supporting Generic object types