/** * Find the lead unit from among award awardPerson units * * @param awardPersonUnits * @return */ public static Unit findLeadUnit(Collection<AwardPersonUnit> awardPersonUnits) { Unit foundLeadUnit = null; for (AwardPersonUnit apu : awardPersonUnits) { if (apu.isLeadUnit()) { foundLeadUnit = apu.getUnit(); } } return foundLeadUnit; }
@Override public int compareTo(AwardPersonUnit other) { return this.unit.getUnitName().compareToIgnoreCase(other.getUnit().getUnitName()); }