public static <E extends EntityBase, FE>
FE findForeignEntity(E entities, Function<E, Long> fnForeignId, Function<Long, FE> fnFindIdIn) {
if (entities == null) return null;
Long fid = fnForeignId.apply(entities);
return fnFindIdIn.apply(fid);
}
City city = Utils.findForeignEntity(candidate,
c -> c.getAddress() != null ? c.getAddress().getCity() : null,
fid -> cityRepo.findOne(fid));
what is "fid" stand for ? I am not familiar with this kind of usage in java. Can anybody give me a clue.