<commit_before>package Debrief.ReaderWriter.Replay;

import java.util.Vector;

import junit.framework.TestCase;

import Debrief.Wrappers.ShapeWrapper;
import MWC.GUI.Shapes.PolygonShape;
import MWC.GUI.Shapes.PolygonShape.PolygonNode;

final class ImportPolyline extends ImportPolygon
{
	/**
	 * the type for this string
	 */
	private final String _myType = ";POLYLINE:";
	
	@Override
	public String getYourType()
	{
		return _myType;
	}
	
	@Override
	protected PolygonShape createShape(final Vector<PolygonNode> nodes)
	{
		final PolygonShape ps = new PolygonShape(nodes);
		ps.setClosed(false);
		return ps;
	}
	
	@Override
	protected boolean canExport(final PolygonShape ps)
	{
		return !ps.getClosed();
	}
	
	public static class TestImportPolyline extends TestCase {
		
		public void testExport()
		{
			final String line = ";POLYLINE: @@ 49 43 49.08 N 004 10 11.60 E 49 38 25.80 N 004 23 58.02 E label";
			final ImportPolyline ip = new ImportPolyline();
			final ShapeWrapper sw = (ShapeWrapper) ip.readThisLine(line);
			assertEquals(line, ip.exportThis(sw));
		}
	}
	}
}<commit_msg>Introduced ImportPolyline<commit_after>package Debrief.ReaderWriter.Replay;

import java.util.Vector;

import junit.framework.TestCase;

import Debrief.Wrappers.ShapeWrapper;

import MWC.GUI.Shapes.PolygonShape;
import MWC.GUI.Shapes.PolygonShape.PolygonNode;

final class ImportPolyline extends ImportPolygon
{
	/**
	 * the type for this string
	 */
	private final String _myType = ";POLYLINE:";
	
	@Override
	public String getYourType()
	{
		return _myType;
	}
	
	@Override
	protected PolygonShape createShape(final Vector<PolygonNode> nodes)
	{
		final PolygonShape ps = new PolygonShape(nodes);
		ps.setClosed(false);
		return ps;
	}
	
	@Override
	protected boolean canExport(final PolygonShape ps)
	{
		return !ps.getClosed();
	}
	
	public static class TestImportPolyline extends TestCase {
		
		public void testExport()
		{
			final String line = ";POLYLINE: @@ 49 43 49.08 N 004 10 11.60 E 49 38 25.80 N 004 23 58.02 E label";
			final ImportPolyline ip = new ImportPolyline();
			final ShapeWrapper sw = (ShapeWrapper) ip.readThisLine(line);
			assertEquals(line, ip.exportThis(sw));
		}
	}

}
{'fraction_non_alphanumeric': 0.09721588315837518, 'fraction_numerical': 0.031036056595162027, 'mean_word_length': 4.269230769230769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1467372', 'n_tokens_mistral': 835, 'n_tokens_neox': 713, 'n_words': 195}