/*
 * The MIT License
 *
 *  Copyright (c) 2012, benas (md.benhassine@gmail.com)
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */

package net.benas.cb4j.core.model;

/**
 * A model class representing a CSV field.
 * @author benas (md.benhassine@gmail.com)
 */
public final class Field {

    /**
     * The field's index in CSV record.
     */
    private int index;

    /**
     * The field's raw content.
     */
    private String content;

    public Field(int index, String content) {
        this.index = index;
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("Field");
        sb.append("[index=").append(index);
        sb.append(", content='").append(content).append('\'');
        sb.append(']');
        return sb.toString();
    }
}

@@ -1652,219 +1652,635 @@
     
-public String getContent() %7B%0D%0A        return content;%0D%0A    %7D%0D%0A%0D%0A    public void setContent(String content) %7B%0D%0A        this.content = content;%0D%0A    %7D%0D%0A%0D%0A    public int getIndex() %7B%0D%0A        return index;%0D%0A    %7D%0D%0A
+/**%0D%0A     * Get the field's raw content.%0D%0A     * @return raw content of the field%0D%0A     */%0D%0A    public String getContent() %7B%0D%0A        return content;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Setter for content%0D%0A     * @param content the content to set%0D%0A     */%0D%0A    public void setContent(String content) %7B%0D%0A        this.content = content;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Get the field's index in CSV record. Indexes are zero-based.%0D%0A     * @return the index of the field in the CSV record%0D%0A     */%0D%0A    public int getIndex() %7B%0D%0A        return index;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Setter for field index%0D%0A     * @param index field index to set%0D%0A     */
 %0D%0A  

add javadoc precision about field indexes (zero-based)