package com.github.vedenin.useful_links.container;

import com.github.vedenin.useful_links.annotation.PropertiesContainer;

/**
 * Container that store information about github's project
 *
 * Created by vvedenin on 5/10/2016.
 */
@PropertiesContainer // class without getter and setter (see Properties in C#)
public class ProjectContainer {
    public String category;
    public String name;
    public String url;
    public String description;
    public Integer star;
    public Integer stackOverflow;
    public String license;
    public String licenseUrl;
    public String site;
    public String userGuide;

    @Override
    public String toString() {
        return "{" +
                "category='" + category + '\'' +
                ", name='" + name + '\'' +
                (url != null?", url='" + url + '\'' : "") +
                (star != null?", star='" + star + '\'' : "") +
                (stackOverflow != null?", stackOverflow='" + stackOverflow + '\'' : "") +
                (license != null?", license='" + license + '\'' : "") +
                (site != null?", site='" + site + '\'' : "") +
                (licenseUrl != null?", licenseUrl='" + licenseUrl + '\'' : "") +
                (userGuide != null?", userGuide='" + userGuide + '\'' : "") +
                (description != null?", description='" + description + '\'' : "") +
                '}';
    }

    public static ProjectContainer create() {
        return new ProjectContainer();
    }
}

@@ -609,16 +609,81 @@
 erGuide;
+%0A    public Integer newStar;%0A    public Integer newStackOverflow;
 %0A%0A    @O
@@ -762,17 +762,25 @@
     
-%22
+toString(
 category
 ='%22 
@@ -779,22 +779,19 @@
 gory
-='%22 + 
+, %22
 category
  + '
@@ -786,23 +786,18 @@
 category
- + '%5C''
+%22)
  +%0A     
@@ -811,153 +811,108 @@
     
-%22, name='%22 + name + '%5C'' +%0A                (url != null?%22, url='%22 + url + '%5C'' : %22%22) +%0A                (star != null?%22, star='%22 + star + '%5C'' : %22
+toString(name, %22name%22) +%0A                toString(url, %22url%22) +%0A                toString(star, %22star
 %22) +
@@ -928,16 +928,24 @@
         
+toString
 (stackOv
@@ -954,39 +954,11 @@
 flow
- != null?%22, stackOverflow='%22 + 
+, %22
 stac
@@ -966,27 +966,16 @@
 Overflow
- + '%5C'' : %22
 %22) +%0A   
@@ -991,122 +991,75 @@
     
-(license != null?%22, license='%22 + license + '%5C'' : %22%22) +%0A                (site != null?%22, site='%22 + site + '%5C'' : %22
+toString(license, %22license%22) +%0A                toString(site, %22site
 %22) +
@@ -1075,16 +1075,24 @@
         
+toString
 (license
@@ -1098,57 +1098,21 @@
 eUrl
- != null?%22, licenseUrl='%22 + licenseUrl + '%5C'' : %22
+, %22licenseUrl
 %22) +
@@ -1128,16 +1128,24 @@
         
+toString
 (userGui
@@ -1150,55 +1150,20 @@
 uide
- != null?%22, userGuide='%22 + userGuide + '%5C'' : %22
+, %22userGuide
 %22) +
@@ -1179,16 +1179,24 @@
         
+toString
 (descrip
@@ -1203,83 +1203,298 @@
 tion
- != null?%22, description='%22 + description + '%5C'' : %22%22) +%0A                '%7D'
+, %22description%22) +%0A                toString(newStar, %22newStar%22) +%0A                toString(newStackOverflow, %22newStackOverflow%22) +%0A                '%7D';%0A    %7D%0A%0A    private static String toString(Object value, String name) %7B%0A        return value != null?%22, %22 + name + %22='%22 + value + '%5C'' : %22%22
 ;%0A  

Add newStar property