/*
 * Copyright 2015 Axel Howind (axel@dua3.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.dua3.meja.io;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Interface used in {@link WorkbookReader} implementations to create rows of
 * data.
 */
public interface IRowBuilder {

    /**
     * Create a row as {@code List<String>}.
     */
    class ListRowBuilder implements IRowBuilder {

        private List<String> row;

        @Override
        public void add(String value) {
            row.add(value);
        }

        @Override
        public void endRow() {
            // nop
        }

        /**
         * Return the constructed row as {@code List<String>}.
         *
         * @return the row as {@code List<String>}
         */
        public List<String> getRow() {
            return Collections.unmodifiableList(row);
        }

        @Override
        public void startRow() {
            row = new ArrayList<>();
        }
    }

    /**
     * Add a value.
     *
     * @param value the value to add
     */
    void add(String value);

    /**
     * End the current row.
     */
    void endRow();

    /**
     * Start a new row.
     */
    void startRow();
}

@@ -841,689 +841,8 @@
  %7B%0A%0A
-    /**%0A     * Create a row as %7B@code List%3CString%3E%7D.%0A     */%0A    class ListRowBuilder implements IRowBuilder %7B%0A%0A        private List%3CString%3E row;%0A%0A        @Override%0A        public void add(String value) %7B%0A            row.add(value);%0A        %7D%0A%0A        @Override%0A        public void endRow() %7B%0A            // nop%0A        %7D%0A%0A        /**%0A         * Return the constructed row as %7B@code List%3CString%3E%7D.%0A         *%0A         * @return the row as %7B@code List%3CString%3E%7D%0A         */%0A        public List%3CString%3E getRow() %7B%0A            return Collections.unmodifiableList(row);%0A        %7D%0A%0A        @Override%0A        public void startRow() %7B%0A            row = new ArrayList%3C%3E();%0A        %7D%0A    %7D%0A%0A
     

remove unused inner class