List<EnergyTrajectoryLine> energyTrajectoryLines;
if (config != null) {
List<IRangeEnergy> rangesList = config.getDimensionX().getRangesEnergyList();
ITrajectoryEnergy trajectoryEnergy;
energyTrajectoryLines = new ArrayList<EnergyTrajectoryLine>();
EnergyTrajectoryLine energyTrajectoryLine;
int row = 0;
for (IRangeEnergy rangeEnergy : rangesList) {
trajectoryEnergy = (ITrajectoryEnergy) rangeEnergy.getTrajectoriesList().get(0);
energyTrajectoryLine = new EnergyTrajectoryLine();
energyTrajectoryLine.setRange(++row);
energyTrajectoryLine.setBeginPosition(trajectoryEnergy.getBeginPosition());
energyTrajectoryLine.setDelta(trajectoryEnergy.getDelta());
energyTrajectoryLine.setEndPosition(trajectoryEnergy.getEndPosition());
energyTrajectoryLine.setIntegrationTime(rangeEnergy.getIntegrationTime());
energyTrajectoryLine.setStepNumber(rangeEnergy.getStepsNumber());
energyTrajectoryLines.add(energyTrajectoryLine);
}
}