<commit_before>/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 <NAME>
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.component.shape;

import javax.faces.context.ResponseWriter;

import java.io.IOException;

/**
 * @author <NAME>
 */
public abstract class PolyShape extends SvgComponent
{
    List<Number> points = new ArrayList<>();

    protected RoundShape(String name)
    {
        super(name);
    }
    
    public void setPoints(List<Number> points)
    {
        this.points = points;
    }
    
    public void addPoint(Number point)
    {
        points.add(point);
    }

    private void processPoints()
    {
      StringBuilder sb = new StringBuilder();
      
      
    }
}<commit_msg>Update PolyShape.java<commit_after>/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 <NAME>
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.component.shape;

import javax.faces.context.ResponseWriter;

import java.io.IOException;

/**
 * @author <NAME>
 */
public abstract class PolyShape extends SvgComponent
{
    List<Point> points = new ArrayList<>();

    protected RoundShape(String name)
    {
        super(name);
    }
    
    public void setPoints(List<Point> points)
    {
        this.points = points;
        processPoints();
    }
    
    public void addPoint(Point point)
    {
        points.add(point);
        processPoints();
    }

    private void processPoints()
    {
      StringBuilder sb = new StringBuilder();
      
      for(Point point : points)
      {
          sb.append(point).append(" ");
      }
      
      sb.setLength(sb.length() - 1);
      
      put("points",sb.toString());
    }
    
    public class Point
    {
        private Number x;
        private Number y;
        
        public Point(Number x, Number y)
        {
            this.x = x;
            this.y = y;
        }
        
        @Override
        public String toString()
        {
            return x + "," + y;
        }
    }
}
{'fraction_non_alphanumeric': 0.11739130434782609, 'fraction_numerical': 0.005652173913043478, 'mean_word_length': 2.047682119205298, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, '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': '7151694', 'n_tokens_mistral': 715, 'n_tokens_neox': 699, 'n_words': 155}