Package edu.uky.ai.util
Class Table.Sequence
java.lang.Object
edu.uky.ai.util.Table.Sequence
- All Implemented Interfaces:
Iterable<Table.Cell>
- Direct Known Subclasses:
Table.Column
,Table.Row
- Enclosing class:
- Table
The abstract parent of
Table.Row
and Table.Column
.- Author:
- Stephen G. Ware
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ImmutableArray<Table.Cell>
The cells that make up this row or columnfinal Object
The row or column lable of this sequencefinal int
The row or column number of this sequencefinal Table
The table this sequence belongs to -
Method Summary
Modifier and TypeMethodDescriptionaverage()
Returns the average of the numeric elements of this sequence (non-numeric values are ignored).Returns the average of the numeric elements of this sequence (non-numeric values are ignored).int
hashCode()
iterator()
sum()
Returns the sum of the numeric elements of this sequence (non-numeric values are ignored).Returns the sum of the numeric elements of this sequence (non-numeric values are ignored).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
table
The table this sequence belongs to -
number
public final int numberThe row or column number of this sequence -
label
The row or column lable of this sequence -
cells
The cells that make up this row or column
-
-
Method Details
-
hashCode
public int hashCode() -
iterator
- Specified by:
iterator
in interfaceIterable<Table.Cell>
-
sum
Returns the sum of the numeric elements of this sequence (non-numeric values are ignored).- Parameters:
function
- a function for converting the values of the cells in this sequence toNumber
s that will be applied to each cell value before adding it to the sum- Returns:
- the sum of the cell values
-
sum
Returns the sum of the numeric elements of this sequence (non-numeric values are ignored).- Returns:
- the sum of the cell values
-
average
Returns the average of the numeric elements of this sequence (non-numeric values are ignored).- Parameters:
function
- a function for converting the values of the cells in this sequence toNumber
s that will be applied to each cell value before including it in the average- Returns:
- the average of the cell values
-
average
Returns the average of the numeric elements of this sequence (non-numeric values are ignored).- Returns:
- the average of the cell values
-