public Permalink findNearest(String id) {
        List<String> ids = new ArrayList<>();
        for (Permalink p : this)
            ids.add(p.getId());
        String nearest = EditDistance.findNearest(id, ids);
        if(nearest==null)   return null;
        return get(nearest);
    }
public Permalink findNearest ( String id ) { List < String > ids = new ArrayList < > ( ) ; for ( Permalink p : this ) ids . add ( p . getId ( ) ) ; String nearest = EditDistance . findNearest ( id , ids ) ; if ( nearest == null ) return null ; return get ( nearest ) ; }
Finds the closest name match by its ID.