com.univocity.parsers.common.processor
Class InputValueSwitch

java.lang.Object
  extended by com.univocity.parsers.common.processor.core.AbstractProcessorSwitch<T>
      extended by com.univocity.parsers.common.processor.core.AbstractInputValueSwitch<ParsingContext>
          extended by com.univocity.parsers.common.processor.InputValueSwitch
All Implemented Interfaces:
ColumnOrderDependent, Processor<ParsingContext>, RowProcessor

public class InputValueSwitch
extends AbstractInputValueSwitch<ParsingContext>
implements RowProcessor

A concrete implementation of RowProcessorSwitch that allows switching among different implementations of RowProcessor based on values found on the rows parsed from the input.


Constructor Summary
InputValueSwitch()
          Creates a switch that will analyze the first column of rows found in the input to determine which RowProcessor to use for each parsed row
InputValueSwitch(int columnIndex)
          Creates a switch that will analyze a column of rows parsed from the input to determine which RowProcessor to use.
InputValueSwitch(String columnName)
          Creates a switch that will analyze a column in rows parsed from the input to determine which RowProcessor 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 which RowProcessor 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 which RowProcessor to use.

Parameters:
columnIndex - the column index whose value will be used to determine which RowProcessor to use for each parsed row.

InputValueSwitch

public InputValueSwitch(String columnName)
Creates a switch that will analyze a column in rows parsed from the input to determine which RowProcessor to use.

Parameters:
columnName - name of the column whose values will be used to determine which RowProcessor to use for each parsed row.


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.