public int isActivatedBy (Trigger trigger)
      {
        if (trigger == null)
          return -1;
        for (int i = 0; i < triggers.length; i++)
          {
            if (triggers[i] == trigger)
              return i;
          }
        return -1;
      }