Package edu.wisc.game.util
Class CsvData.BasicLineEntry
java.lang.Object
edu.wisc.game.util.CsvData.BasicLineEntry
- All Implemented Interfaces:
CsvData.LineEntry
- Enclosing class:
- CsvData
public static class CsvData.BasicLineEntry extends Object implements CsvData.LineEntry
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
Requires the equality of the strings in all fieldsString
getCol(int j)
String
getColByName(CsvData.BasicLineEntry header, String name, String defVal)
Picks the value from this line's column with the specified column name.Integer
getColInt(int j)
String
getKey()
The key associated with this data line.int
nCol()
String
toString()
-
Method Details
-
nCol
public int nCol() -
getKey
Description copied from interface:CsvData.LineEntry
The key associated with this data line. Typically, the key of a data line is string from the first column. On the other hand, comment lines don't have keys.- Specified by:
getKey
in interfaceCsvData.LineEntry
-
getCol
- Parameters:
j
- zero-based column index
-
getColInt
-
getColByName
Picks the value from this line's column with the specified column name.- Parameters:
header
- This is where the column names arename
- The desired column namedefVal
- The value to return if the header has no column with the desired name, or if this line is too short and does not have that many columns
-
equals
Requires the equality of the strings in all fields -
toString
-