public int maxPoints(Point[] points) {
    	if (points.length==0) return 0;
    	
    	//create lines
    	HashMap<Point,Integer> pointValue = getPointValue(points);
    	Object[] np = pointValue.keySet().toArray();
    	if (np.length==1) 
    	{	
    		return pointValue.get(np[0]);
    	}
    	
    	HashMap<Line,ResType>  lines = new HashMap<Line,ResType>();
    	for (int m=0;m<np.length-1;m++)
    		for(int n=m+1;n<np.length;n++)
	    	{
    			Point x = (Point) np[m];
    			Point y = (Point) np[n];
	    		Line l = new Line(x,y);
	    		if (lines.containsKey(l))
	    		{
	    			ResType res = (ResType)lines.get(l);
	    			res.addObject(x);
	    			res.addObject(y);
	    		}
	    		else 
	    		{
	    			ResType res = new ResType();
	    			res.addObject(x);
	    			res.addObject(y);
	    			lines.put(l,res);
	    		}
	    		
	    	}
	    
    	//count lines 
    	Iterator<ResType> t  = lines.values().iterator();
    	Integer Max = Integer.MIN_VALUE;
    	while(t.hasNext())
    	{
    		ResType res = t.next();
    		Integer count = res.getValue(pointValue);
    		if (count >Max)
    		{
    			Max = count;
    		}
    	}
    	
    	
    	return Max;
    }