import java.awt.*;

public class VectorImage  {
	
	public final int MAX_LENGTH=20;
	private Image[] arrayImage= new Image[MAX_LENGTH];
	private int[] xLocation= new int[MAX_LENGTH];
	private int[] yLocation= new int[MAX_LENGTH];
	private String[] name=new String[MAX_LENGTH];
	private int currentLength;
	
	
	public VectorImage() {
		
		currentLength=0; 		 		
 	}

	public void addImage(Image img, String imageName) {
				 
			if (currentLength>=MAX_LENGTH) 
				clearVector();
			arrayImage[currentLength]=img;
			name[currentLength]=imageName;
			currentLength+=1;	 		
 	}
 	
 	public void setImageLocation(int x, int y, int index) {
				 
		xLocation[index]=x;
		yLocation[index]=y;
						 		
 	}
 	
 	public int getImageXLocation(int i) {
				 
		return xLocation[i];
							 		
 	}
 	
 	public int getImageYLocation(int i) {
				 
		return yLocation[i];
							 		
 	}
 	
 	public Image getImage(int i) {
				 
		return arrayImage[i];
							 		
 	} 
 
 	public String getImageName(int i) {
				 
		return name[i];
							 		
 	} 
 	
 	public int getVectorLength() {
				 
		return currentLength;
						 		
 	}
 	
 	public void clearVector() {
				 
		for (int i=0;i<currentLength;i++) {
			arrayImage[i]=null;
			xLocation[i]=0;
			yLocation[i]=0;
		}
		currentLength=0;
 	}
}