int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) {  resultCol = new ArrayList(0); } else if (nuids == 1) {  final UID uid = (UID)uids.iterator().next();  UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uid.equals(((UniqueObject)o).getUID()))); } };  resultCol = support.queryBlackboard(pred);  } else {   UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uids.contains(((UniqueObject)o).getUID()))); } };  resultCol = support.queryBlackboard(pred);
int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) {  resultCol = new ArrayList(0); } else if (nuids == 1) {  final UID uid = (UID)uids.iterator().next();  UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uid.equals(((UniqueObject)o).getUID()))); } };  resultCol = support.queryBlackboard(pred);  } else {   UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uids.contains(((UniqueObject)o).getUID()))); } };  resultCol = support.queryBlackboard(pred); }  return resultCol;
  private static Collection findUniqueObjects(					      SimpleServletSupport support,					      final Set uids) {        Collection resultCol;        int nuids = ((uids != null) ? uids.size() : 0);    if (nuids <= 0) {      // find nothing?      resultCol = new ArrayList(0);    } else if (nuids == 1) {      // get the single UID      final UID uid = (UID)uids.iterator().next();      // create a predicate      UnaryPredicate pred =         new UnaryPredicate() {          public boolean execute(Object o) {            return               ((o instanceof UniqueObject) &&               (uid.equals(((UniqueObject)o).getUID())));          }        };      // query      resultCol = support.queryBlackboard(pred);      //      resultCol = querySupport.query(pred);    } else {      // find multiple UniqueObjects      // create a predicate      UnaryPredicate pred =         new UnaryPredicate() {          public boolean execute(Object o) {            return               ((o instanceof UniqueObject) &&               (uids.contains(((UniqueObject)o).getUID())));          }        };      // query      resultCol = support.queryBlackboard(pred);    }    return resultCol;  }