com.quadrique.jbuildingblocks.core.io.file.parser
Class JbbFormattedTextFileLine

java.lang.Object
  extended by com.quadrique.jbuildingblocks.core.io.file.parser.JbbFormattedTextFileLine

public class JbbFormattedTextFileLine
extends Object

This class represents a parsed line of a formatted text field (e.g .a CSV file)

Author:
Hervé Rivere

Constructor Summary
JbbFormattedTextFileLine()
           
 
Method Summary
 int getLineNumber()
           
 JbbStringLabelToIndexMap getMap()
           
 ArrayList<String> getTokens()
           
 String getValue(int columnIndex)
           
 String getValue(String columnName)
           
 double getValueAsDouble(int columnIndex)
           
 double getValueAsDouble(String columnName)
           
 float getValueAsFloat(int columnIndex)
           
 float getValueAsFloat(String columnName)
           
 int getValueAsInt(int columnIndex)
           
 int getValueAsInt(String columnName)
           
 void setLineNumber(int lineNumber)
           
 void setMap(JbbStringLabelToIndexMap map)
           
 void setTokens(ArrayList<String> tokens)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbbFormattedTextFileLine

public JbbFormattedTextFileLine()
Method Detail

getLineNumber

public int getLineNumber()
Returns:
Returns the lineNumber.

setLineNumber

public void setLineNumber(int lineNumber)
Parameters:
lineNumber - The lineNumber to set.

getTokens

public ArrayList<String> getTokens()
Returns:
Returns the tokens.

setTokens

public void setTokens(ArrayList<String> tokens)
Parameters:
tokens - The tokens to set.

getMap

public JbbStringLabelToIndexMap getMap()
Returns:
Returns the map.

setMap

public void setMap(JbbStringLabelToIndexMap map)
Parameters:
map - The map to set.

getValue

public String getValue(int columnIndex)
                throws Exception
Parameters:
columnIndex - (0 based)
Returns:
the value
Throws:
Exception

getValueAsInt

public int getValueAsInt(int columnIndex)
                  throws Exception
Parameters:
columnIndex - (0 based)
Returns:
integer value
Throws:
Exception

getValueAsFloat

public float getValueAsFloat(int columnIndex)
                      throws Exception
Parameters:
columnIndex - (0 based)
Returns:
float value
Throws:
Exception

getValueAsDouble

public double getValueAsDouble(int columnIndex)
                        throws Exception
Parameters:
columnIndex - (0 based)
Returns:
double value
Throws:
Exception

getValue

public String getValue(String columnName)
                throws Exception
Parameters:
columnName -
Returns:
String value
Throws:
Exception

getValueAsInt

public int getValueAsInt(String columnName)
                  throws Exception
Parameters:
columnName -
Returns:
integer value
Throws:
Exception

getValueAsFloat

public float getValueAsFloat(String columnName)
                      throws Exception
Parameters:
columnName -
Returns:
float value
Throws:
Exception

getValueAsDouble

public double getValueAsDouble(String columnName)
                        throws Exception
Parameters:
columnName -
Returns:
double value
Throws:
Exception


Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.