de.erichseifert.gral.data
Class Column<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- de.erichseifert.gral.data.Column<T>
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<T>
public class Column<T extends java.lang.Comparable<T>> extends java.lang.Object implements java.lang.Iterable<T>, java.io.SerializableClass for accessing a specific column of a data source. The data of the column can be accessed using the
get(int)method.Example for accessing value at column 2, row 3 of a data source:
Column col = new Column(dataSource, 2); Number v = col.get(3);
- See Also:
DataSource, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Column(java.lang.Class<T> dataType, java.lang.Iterable<T> data)Column(java.lang.Class<T> dataType, T... data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)Tget(int row)doublegetStatistics(java.lang.String key)java.lang.Class<? extends java.lang.Comparable<?>>getType()inthashCode()booleanisNumeric()Returns whether this column only contains numbers.java.util.Iterator<T>iterator()intsize()
-
-
-
Method Detail
-
get
public T get(int row)
-
size
public int size()
-
isNumeric
public boolean isNumeric()
Returns whether this column only contains numbers.- Returns:
trueif this column is numeric, otherwisefalse.
-
getType
public java.lang.Class<? extends java.lang.Comparable<?>> getType()
-
getStatistics
public double getStatistics(java.lang.String key)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG