Exemplo n.º 1
0
  public RescueInfo findActiveRescueFor(IokeObject condition) {
    for (List<RescueInfo> lrp : rescues.get()) {
      for (RescueInfo rp : lrp) {
        for (Object possibleKind : rp.applicableConditions) {
          if (IokeObject.isMimic(condition, IokeObject.as(possibleKind, condition))) {
            return rp;
          }
        }
      }
    }

    return null;
  }
Exemplo n.º 2
0
  public List<HandlerInfo> findActiveHandlersFor(IokeObject condition, BindIndex stopIndex) {
    List<HandlerInfo> result = new ArrayList<HandlerInfo>();

    for (List<HandlerInfo> lrp : handlers.get()) {
      for (HandlerInfo rp : lrp) {
        if (rp.index.lessThan(stopIndex)) {
          return result;
        }

        for (Object possibleKind : rp.applicableConditions) {
          if (IokeObject.isMimic(condition, IokeObject.as(possibleKind, condition))) {
            result.add(rp);
          }
        }
      }
    }

    return result;
  }