station.x, station.y, 0, stationKey.index);
station.x, station.y, now.getTime(), stationKey.index);
    private void transferCargoToStation(int cargoType, int amountToTransfer,	    CargoBundle from, CargoBundle to, CargoBundle droppedOff,	    ObjectKey stationKey) {	if (0 == amountToTransfer)	    return;	StationModel station = (StationModel) w.get(KEY.STATIONS,		stationKey.index, stationKey.principal);	Iterator batches = from.cargoBatchIterator();	int amountTransferedSoFar = 0;	DemandAtStation demand = station.getDemand();	ConvertedAtStation converted = station.getConverted();		while (batches.hasNext() &&		amountTransferedSoFar < amountToTransfer) {	    CargoBatch cb = (CargoBatch)((Entry) batches.next()).getKey();	    if (cb.getCargoType() == cargoType) {		int amount = from.getAmount(cb);		int amountOfThisBatchToTransfer;		if (amount < amountToTransfer - amountTransferedSoFar) {		    amountOfThisBatchToTransfer = amount;		    batches.remove();		} else {		    amountOfThisBatchToTransfer = amountToTransfer -			amountTransferedSoFar;		    from.addCargo(cb, -amountOfThisBatchToTransfer);		}		if (droppedOff != null && demand.isCargoDemanded(cargoType))		    droppedOff.addCargo(cb, amountOfThisBatchToTransfer);                if (converted.isCargoConverted(cargoType)) {                    int newCargoType = converted.getConversion(cargoType);                    CargoBatch newCargoBatch = new CargoBatch(newCargoType,                            station.x, station.y, 0, stationKey.index);                    to.addCargo(newCargoBatch, amountOfThisBatchToTransfer);                }		amountTransferedSoFar += amountOfThisBatchToTransfer;	    }	}    }