void setFirstKey ( ByteArraySegment newKey ) { Preconditions . checkState ( getCount ( ) > 0 , "BTreePage is empty. Cannot set first key." ) ; Preconditions . checkArgument ( newKey . getLength ( ) == this . config . getKeyLength ( ) , "Incorrect key length." ) ; Preconditions . checkArgument ( KEY_COMPARATOR . compare ( newKey , getKeyAt ( 0 ) ) <= 0 , "Replacement first Key must be smaller than or equal to the existing first key." ) ; this . data . copyFrom ( newKey , 0 , newKey . getLength ( ) ) ; }
Updates the first PageEntry s key to the given value .