public static DecoratedKey getMinimalKey ( DecoratedKey key ) { return key . getKey ( ) . position ( ) > 0 || key . getKey ( ) . hasRemaining ( ) || ! key . getKey ( ) . hasArray ( ) ? new BufferDecoratedKey ( key . getToken ( ) , HeapAllocator . instance . clone ( key . getKey ( ) ) ) : key ; }
If the given