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
All Methods Instance Methods Concrete Methods 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()
Same as getCol(0)int
nCol()
String
toString()
-
-
-
Method Detail
-
nCol
public int nCol()
-
getKey
public String getKey()
Same as getCol(0)- Specified by:
getKey
in interfaceCsvData.LineEntry
- Returns:
- the leftmost column
-
getCol
public String getCol(int j)
- Parameters:
j
- zero-based column index
-
getColInt
public Integer getColInt(int j)
-
getColByName
public String getColByName(CsvData.BasicLineEntry header, String name, String defVal)
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
public boolean equals(Object o)
Requires the equality of the strings in all fields
-
-