org.jnario.lib
Class ExampleTable<T extends ExampleTableRow>
java.lang.Object
org.jnario.lib.ExampleTable<T>
- All Implemented Interfaces:
- Iterable<T>
public class ExampleTable<T extends ExampleTableRow>
- extends Object
- implements Iterable<T>
An implementation of a table with rows and columns. It should
be used together with Each.forEach(ExampleTable, org.eclipse.xtext.xbase.lib.Procedures.Procedure1).
- Author:
- Sebastian Benz - Initial contribution and API
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExampleTable
public ExampleTable(String name,
List<String> columns,
List<T> rows)
create
public static <P extends ExampleTableRow> ExampleTable<P> create(String name,
List<String> columns,
P... entries)
get
public T get(int index)
- Returns the table row at the specified index.
- Parameters:
index -
- Returns:
- the table row
- Throws:
IndexOutOfBoundsException - if the index is out of range
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T extends ExampleTableRow>
getRows
public List<T> getRows()
- Returns:
- the list of rows
getColumnNames
public List<String> getColumnNames()
- Returns:
- the column names
getName
public String getName()
- Returns:
- the name of this table
Copyright © 2012-2013 BMW Car IT. All Rights Reserved.