// Path: java2word/src/main/java/word/api/interfaces/IElement.java
// public interface IElement {
// 
// 	/**
// 	 * <p>This method returns the content (XML or HTML) of the Element and the content.</p>
// 	 * <p>If you are using W2004, the return will be the XML required to generate the element.</p>
// 	 *
// 	 * <p>Important: Once you call this method, the Document value is cached an no elements can be added later.</p>
// 	 *
// 	 * @return this is the String value of the element ready to be appended/inserted in the Document.<br>
// 	 *
// 	 * <p>This is the XML that generates a <code>BreakLine</code>:</p>
// 	 * <code>
// 	 *  <w:p wsp:rsidR='008979E8' wsp:rsidRDefault='008979E8'/>
// 	 * </code>
// 	 */
// 	public String getContent();
// 
// }
// 
// Path: java2word/src/main/java/word/api/interfaces/IFluentElement.java
// public interface IFluentElement <F>{
// 
// 	/**
// 	 * This method is just to keep the API consistent when you do something like:
// 	 * 		Heading1 myHEading = Heading1.with("h3333").<b>create();</b>
// 	 * It is just to have that "create()" at the end but the following code is the same:
// 	 * 		Heading1 myHEading = Heading1.with("h3333");
// 	 * 
// 	 * Anyway, it is here for sake of consistency or semantic
// 	 * 
// 	 * @return
// 	 * 
// 	 */
// 	public F create();
// 	
// }


import word.api.interfaces.IElement;
import word.api.interfaces.IFluentElement;
package word.w2004.elements;


/**
 * Breaks lines like when you press enter in your MS Word.
 * You can insert many Breaklines at once. Eg.:
 * <code>
 * new BreakLine(3)
 * </code>
 * This will insert 3 Breaklines.
 * FOR A MATTER OR EXERCICE, THIS CLASS FOLLOWS ALL THOSE CRASY CHECKSTYLE GUIDELINES.
 */
public class BreakLine implements IElement, IFluentElement<BreakLine> {
    /**Number of repetitions.*/
    private int times = 1;

    @Override
    public final String getContent() {
        StringBuilder res = new StringBuilder("");
        applyBreakLineTimes(res);
        return res.toString();
    }

    /** Apply the repetition of break lines.
     * @param res string to be added content
     */
    private void applyBreakLineTimes(final StringBuilder res) {
        for (int i = 0; i < times; i++) {
            res.append("\n<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>");
        }
    }

    /**
     * constructor: Number of break lines you want to add.
     * @param times number of breaklines
     */
    public BreakLine(final int times) {
        this.times = times;
    }

    /** constructor: By default, 1 Number of break line when no number is provided.
     * @param times
     */
    public BreakLine() {
    }

    /** Created Breaklines according to the number of times provided.
     * @param value number of times
     * @return the Breakline object ready to go!
     */
    public static BreakLine times(final Integer value) {
        return new BreakLine(value);
    }

    /** returns the Breakline object.
     * @return the object breakline
     */
// Path: java2word/src/main/java/word/api/interfaces/IElement.java
// public interface IElement {
// 
// 	/**
// 	 * <p>This method returns the content (XML or HTML) of the Element and the content.</p>
// 	 * <p>If you are using W2004, the return will be the XML required to generate the element.</p>
// 	 *
// 	 * <p>Important: Once you call this method, the Document value is cached an no elements can be added later.</p>
// 	 *
// 	 * @return this is the String value of the element ready to be appended/inserted in the Document.<br>
// 	 *
// 	 * <p>This is the XML that generates a <code>BreakLine</code>:</p>
// 	 * <code>
// 	 *  <w:p wsp:rsidR='008979E8' wsp:rsidRDefault='008979E8'/>
// 	 * </code>
// 	 */
// 	public String getContent();
// 
// }
// 
// Path: java2word/src/main/java/word/api/interfaces/IFluentElement.java
// public interface IFluentElement <F>{
// 
// 	/**
// 	 * This method is just to keep the API consistent when you do something like:
// 	 * 		Heading1 myHEading = Heading1.with("h3333").<b>create();</b>
// 	 * It is just to have that "create()" at the end but the following code is the same:
// 	 * 		Heading1 myHEading = Heading1.with("h3333");
// 	 * 
// 	 * Anyway, it is here for sake of consistency or semantic
// 	 * 
// 	 * @return
// 	 * 
// 	 */
// 	public F create();
// 	
// }


// Path: java2word/src/main/java/word/w2004/elements/BreakLine.java
import word.api.interfaces.IElement;
import word.api.interfaces.IFluentElement;

package word.w2004.elements;


/**
 * Breaks lines like when you press enter in your MS Word.
 * You can insert many Breaklines at once. Eg.:
 * <code>
 * new BreakLine(3)
 * </code>
 * This will insert 3 Breaklines.
 * FOR A MATTER OR EXERCICE, THIS CLASS FOLLOWS ALL THOSE CRASY CHECKSTYLE GUIDELINES.
 */
public class BreakLine implements IElement, IFluentElement<BreakLine> {
    /**Number of repetitions.*/
    private int times = 1;

    @Override
    public final String getContent() {
        StringBuilder res = new StringBuilder("");
        applyBreakLineTimes(res);
        return res.toString();
    }

    /** Apply the repetition of break lines.
     * @param res string to be added content
     */
    private void applyBreakLineTimes(final StringBuilder res) {
        for (int i = 0; i < times; i++) {
            res.append("\n<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>");
        }
    }

    /**
     * constructor: Number of break lines you want to add.
     * @param times number of breaklines
     */
    public BreakLine(final int times) {
        this.times = times;
    }

    /** constructor: By default, 1 Number of break line when no number is provided.
     * @param times
     */
    public BreakLine() {
    }

    /** Created Breaklines according to the number of times provided.
     * @param value number of times
     * @return the Breakline object ready to go!
     */
    public static BreakLine times(final Integer value) {
        return new BreakLine(value);
    }

    /** returns the Breakline object.
     * @return the object breakline
     */
    @Override