All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.x5.template.TableOfMaps Maven / Gradle / Ivy

There is a newer version: 3.6.2
Show newest version
package com.x5.template;

import java.util.List;
import java.util.Map;

import com.x5.util.TableData;

public class TableOfMaps implements TableData
{
    private List> data;
    int cursor = -1;

    @SuppressWarnings({"unchecked","rawtypes"})
    public TableOfMaps(List list)
    {
        this.data = (List>)list;
    }
    
    public String[] getColumnLabels()
    {
        return null;
    }

    public void setColumnLabels(String[] labels)
    {
    }

    public String[] getRow()
    {
        return null;
    }

    public boolean hasNext()
    {
        if (data != null && data.size() > cursor + 1) {
            return true;
        } else {
            return false;
        }
    }

    public Map nextRecord()
    {
        cursor++;
        if (data == null || cursor >= data.size()) {
            return null;
        } else {
            return data.get(cursor);
        }
    }

    public void reset()
    {
        cursor = -1;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy