//package arpClasses.Drawing;

import java.io.*;
import java.awt.*;

public class PolyLine implements Serializable{
	int[] box;
	int numParts, numPoints;
	int[] parts;
	Point[] points;
	int level = 0;
	String road_name = new String();
	
	public PolyLine(int[] box, int numParts, int numPoints, int[] parts, Point[] points){
		this.box=box;
		this.numParts=numParts;
		this.numPoints=numPoints;
		this.parts=parts;
		this.points=points;	
	}
	public void toPrint(){
		System.out.println("Record Name "+road_name+" Lv "+level);
		System.out.println();
		System.out.println("Xmin ="+box[0]);
		System.out.println("Ymin ="+box[1]);
		System.out.println("Xmax ="+box[2]);
		System.out.println("Ymax ="+box[3]);
		System.out.println();
		System.out.println("Parts="+numParts+" ; Points ="+numPoints);
		for(int i=0;i<parts.length;i++){
			System.out.print(parts[i]+" ");
		}
		System.out.println();
	  for(int i=0;i<points.length;i++){
	    System.out.println(points[i].getX()+" "+points[i].getY()+" ");
	  }
		System.out.println();
	}
	
	public Point[] getPoints(){
		return points;
	}
	
	public int[] getXs(){
		int[] x = new int[points.length];
	for(int i=0;i<points.length;i++){
	   x[i]=(int)(points[i].getX());
	   }
	   return x;
	}
    public int[] getYs(){
	int y[] = new int[points.length];
	for(int i=0;i<points.length;i++){
	   y[i]=(int)(points[i].getY());
	}
	return y;
	}
	public int getNumPoints(){
		return numPoints;
	}
	public int[] getBox(){
		return box;
	}
	public void setName(String name){
		road_name = name;
	}
	public String getName(){
		return road_name;
	}
  public void setLevel(int level){
	this.level = level;
  }
  public int getLevel(){
  	return level;
	}
}