private Collection < PersonDocument > copy ( final Collection < PersonDocumentMongo > in ) { final List < PersonDocument > out = new ArrayList <> ( in ) ; Collections . sort ( out , new PersonDocumentComparator ( ) ) ; return out ; }
Correct the type of the collection .