File: ReverseRangeCmd.java

package info (click to toggle)
gpsprune 26.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,824 kB
  • sloc: java: 52,154; sh: 25; makefile: 21; python: 15
file content (22 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package tim.prune.cmd;

import java.util.List;

/**
 * Command to reverse a specific range of the track
 */
public class ReverseRangeCmd extends CompoundCommand
{
	public ReverseRangeCmd(List<Integer> inPointIndexes, List<PointFlag> inSegmentPoints)
	{
		addCommand(new RearrangePointsCmd(inPointIndexes));
		if (inSegmentPoints != null)
		{
			SetSegmentsCmd segmentCommand = new SetSegmentsCmd();
			for (PointFlag pf : inSegmentPoints) {
				segmentCommand.addSegmentFlag(pf.getPoint(), pf.getFlag());
			}
			addCommand(segmentCommand);
		}
	}
}