return Collections.max(this.getGrantContractsSet(), new Comparator<GrantContract>() { public int compare(GrantContract o1, GrantContract o2) { return o1.getContractNumber().compareTo(o2.getContractNumber()); } });
List<GrantContract> grantContracts = this.getGrantContracts(); return (!grantContracts.isEmpty()) ? Collections.max(this.getGrantContractsSet(), new Comparator<GrantContract>() { public int compare(GrantContract o1, GrantContract o2) { return o1.getContractNumber().compareTo(o2.getContractNumber()); } }) : null;
    public GrantContract readGrantContractWithMaximumContractNumber() {        return Collections.max(this.getGrantContractsSet(), new Comparator<GrantContract>() {            public int compare(GrantContract o1, GrantContract o2) {                return o1.getContractNumber().compareTo(o2.getContractNumber());            }        });    }