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

net.anotheria.util.datatable.DataRow Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package net.anotheria.util.datatable;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * A DataRow is basically a list of cells.
 *
 * @author lrosenberg
 * @version $Id: $Id
 */
public class DataRow  implements Iterable {
	/**
	 * The list with cells.
	 */
	private List cells;
	
	/**
	 * 

Constructor for DataRow.

*/ public DataRow(){ this(15); } /** *

Constructor for DataRow.

* * @param initialCapacity a int. */ public DataRow(int initialCapacity){ cells = new ArrayList<>(initialCapacity); } /** *

getCell.

* * @param index a int. * @return a {@link net.anotheria.util.datatable.DataCell} object. */ public DataCell getCell(int index){ return cells.get(index); } /** *

setCell.

* * @param index a int. * @param cell a {@link net.anotheria.util.datatable.DataCell} object. */ public void setCell(int index, DataCell cell){ cells.set(index, cell); } /** *

addCell.

* * @param cell a {@link net.anotheria.util.datatable.DataCell} object. */ public void addCell(DataCell cell){ cells.add(cell); } void removeCell(int index){ cells.remove(index); } /** *

getRowSize.

* * @return a int. */ public int getRowSize(){ return cells.size(); } /** {@inheritDoc} */ @Override public Iterator iterator() { return cells.iterator(); } /** {@inheritDoc} */ @Override public String toString(){ return cells.toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy