@Override
 public boolean isActivationEvent(
     DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
   if (e.getType() != FlightEvent.Type.EJECTION_CHARGE) return false;
   RocketComponent charge = e.getSource();
   return charge.getStageNumber() == source.getStageNumber();
 }
      @Override
      public boolean isActivationEvent(
          DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
        if (e.getType() != FlightEvent.Type.STAGE_SEPARATION) return false;

        int separation = e.getSource().getStageNumber();
        int current = source.getStageNumber();
        return (current + 1 == separation);
      }
      @SuppressWarnings("unchecked")
      @Override
      public boolean isActivationEvent(
          DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
        if (e.getType() != FlightEvent.Type.ALTITUDE) return false;

        double alt = config.deployAltitude;
        Pair<Double, Double> altitude = (Pair<Double, Double>) e.getData();

        return (altitude.getU() >= alt) && (altitude.getV() <= alt);
      }
 @Override
 public boolean isActivationEvent(
     DeploymentConfiguration config, FlightEvent e, RocketComponent source) {
   return e.getType() == FlightEvent.Type.APOGEE;
 }