Class InputValueSwitch
- java.lang.Object
-
- com.univocity.parsers.common.processor.core.AbstractProcessorSwitch<T>
-
- com.univocity.parsers.common.processor.core.AbstractInputValueSwitch<ParsingContext>
-
- com.univocity.parsers.common.processor.InputValueSwitch
-
- All Implemented Interfaces:
ColumnOrderDependent
,Processor<ParsingContext>
,RowProcessor
public class InputValueSwitch extends AbstractInputValueSwitch<ParsingContext> implements RowProcessor
A concrete implementation ofRowProcessorSwitch
that allows switching among different implementations ofRowProcessor
based on values found on the rows parsed from the input.
-
-
Constructor Summary
Constructors Constructor Description InputValueSwitch()
Creates a switch that will analyze the first column of rows found in the input to determine whichRowProcessor
to use for each parsed rowInputValueSwitch(int columnIndex)
Creates a switch that will analyze a column of rows parsed from the input to determine whichRowProcessor
to use.InputValueSwitch(java.lang.String columnName)
Creates a switch that will analyze a column in rows parsed from the input to determine whichRowProcessor
to use.
-
Method Summary
-
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractInputValueSwitch
addSwitchForValue, addSwitchForValue, addSwitchForValue, addSwitchForValue, addSwitchForValue, addSwitchForValue, getHeaders, getIndexes, hasDefaultSwitch, setCaseSensitive, setComparator, setDefaultSwitch, setDefaultSwitch, setDefaultSwitch, switchRowProcessor
-
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractProcessorSwitch
preventColumnReordering, processEnded, processorSwitched, processStarted, rowProcessed, rowProcessorSwitched
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.univocity.parsers.common.processor.RowProcessor
processEnded, processStarted, rowProcessed
-
-
-
-
Constructor Detail
-
InputValueSwitch
public InputValueSwitch()
Creates a switch that will analyze the first column of rows found in the input to determine whichRowProcessor
to use for each parsed row
-
InputValueSwitch
public InputValueSwitch(int columnIndex)
Creates a switch that will analyze a column of rows parsed from the input to determine whichRowProcessor
to use.- Parameters:
columnIndex
- the column index whose value will be used to determine whichRowProcessor
to use for each parsed row.
-
InputValueSwitch
public InputValueSwitch(java.lang.String columnName)
Creates a switch that will analyze a column in rows parsed from the input to determine whichRowProcessor
to use.- Parameters:
columnName
- name of the column whose values will be used to determine whichRowProcessor
to use for each parsed row.
-
-