예제 #1
0
 @Override
 public boolean include(
     RowFilter.Entry<? extends PersonnelTableModel, ? extends Integer> entry) {
   Person p = entry.getModel().getPerson(entry.getIdentifier().intValue());
   if (!p.isActive()) {
     return false;
   }
   if (!prisoners && (p.isPrisoner() || p.isBondsman())) {
     return false;
   }
   if ((null != primaryRole) && (p.getPrimaryRole() != primaryRole.intValue())) {
     return false;
   }
   if ((null != expLevel) && (p.getExperienceLevel(false) != expLevel.intValue())) {
     return false;
   }
   if ((null != skill)) {
     Skill s = p.getSkill(skill);
     if (null == s) {
       int cost = SkillType.getType(skill).getCost(0);
       return (cost >= 0) && (cost <= p.getXp());
     } else {
       int cost = s.getCostToImprove();
       return (s.getLevel() < maxSkillLevel) && (cost >= 0) && (cost <= p.getXp());
     }
   }
   return true;
 }
예제 #2
0
 @Override
 public boolean include(RowFilter.Entry<? extends TableModel, ? extends Integer> entry) {
   int index = entry.getIdentifier();
   ThrustCurveMotorSet m = model.getMotorSet(index);
   return filterManufacturers(m)
       && filterUsed(m)
       && filterBySize(m)
       && filterByString(m)
       && filterByImpulseClass(m);
 }