Top Description Methods
com.univocity.parsers.common.fields

public Interface FieldSelector

extends Cloneable
Known Direct Implementers
com.univocity.parsers.common.fields.AllIndexesSelector, com.univocity.parsers.common.fields.ExcludeFieldEnumSelector, com.univocity.parsers.common.fields.ExcludeFieldIndexSelector, com.univocity.parsers.common.fields.ExcludeFieldNameSelector, com.univocity.parsers.common.fields.FieldEnumSelector, com.univocity.parsers.common.fields.FieldIndexSelector, com.univocity.parsers.common.fields.FieldNameSelector
Imports
com.univocity.parsers.common.*

Interface used to identify classes capable of selecting fields and returning their positions in a given sequence.
Author
Univocity Software Pty Ltd - [email protected]

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a copy of the current field selector.
clone
()

Clones this field selector.

public String

Returns:

a string that represents the current field selection
describe
()

Returns a string that represents the current field selection

public int[]

Returns:

the positions of all selected elements in the given headers sequence.
getFieldIndexes
(String[]
the sequence of headers that might have some elements selected by this FieldSelector
headers
)

Returns the indexes of any selected fields that are part of a sequence of headers.

public int[]

Returns:

the positions of all selected elements in the given headers sequence.
getFieldIndexes
(NormalizedString[]
the sequence of headers that might have some elements selected by this FieldSelector
headers
)

Returns the indexes of any selected fields that are part of a sequence of headers.

Method Detail

cloneback to summary
public Object clone()

Clones this field selector. Changes to the selection on the clone won't be reflected on the original

Returns:Object

a copy of the current field selector.

describeback to summary
public String describe()

Returns a string that represents the current field selection

Returns:String

a string that represents the current field selection

getFieldIndexesback to summary
public int[] getFieldIndexes(String[] headers)

Returns the indexes of any selected fields that are part of a sequence of headers.

Parameters
headers:String[]

the sequence of headers that might have some elements selected by this FieldSelector

Returns:int[]

the positions of all selected elements in the given headers sequence.

getFieldIndexesback to summary
public int[] getFieldIndexes(NormalizedString[] headers)

Returns the indexes of any selected fields that are part of a sequence of headers.

Parameters
headers:NormalizedString[]

the sequence of headers that might have some elements selected by this FieldSelector

Returns:int[]

the positions of all selected elements in the given headers sequence.