/** * Copies all the contents from this backend to the {@code target}. * * @param target the backend where to store the copied content */ private void copyTo(Backend target) { // This back-end and the target are the same object if (equals(target)) { return; } try { if (getClass() == target.getClass()) { internalCopyTo(target); } else { defaultCopyTo(target); } } catch (UnsupportedOperationException e) { defaultCopyTo(target); } }