* @throws TrieNotCopyableException
*/
@SuppressWarnings("unchecked")
public void copy(final TrieWithValue<T> trie) throws TrieNotCopyableException {
if (!trie.hasCompleteMetadata())
throw new TrieNotCopyableException();
this.clear();
trie.prepareForReading();