Top Description Fields Constructors Methods
com.opencsv.bean

public Class FieldMapByNameEntry<T>

extends Object
Class Inheritance
Type Parameters
<T>
The type of the bean being converted

Represents one entry in FieldMapByName.

Note

This is not used in the internal structure of FieldMapByName, but rather when representing its contents to the outside world.

Author
Andrew Rucker Jones
Since
4.2

Field Summary

Modifier and TypeField and Description
private final BeanField<T, String>
field

The BeanField associated with this header or these headers.

private final String
name

The name of the header or a regular expression pattern matching possible names for the header.

private final boolean
regexPattern

Whether name is a header name or a regular expression pattern that is meant to match header names.

Constructor Summary

AccessConstructor and Description
public
FieldMapByNameEntry(String
The name or regular expression pattern representing the header(s)
name
,
BeanField<T, String>
The field associated with the header(s)
field
,
boolean
Whether or not name is a regular expression pattern
regexPattern
)

Initializes the entry.

Method Summary

Modifier and TypeMethod and Description
public BeanField<T, String>
getField()

Returns: The BeanField associated with this header or these headers

public String
getName()

Returns: The name of the header or a regular expression pattern matching all possible header names

public boolean
isRegexPattern()

Returns: Whether the string returned by getName() is a header name or a regular expression pattern to match header names

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldback to summary
private final BeanField<T, String> field

The BeanField associated with this header or these headers.

nameback to summary
private final String name

The name of the header or a regular expression pattern matching possible names for the header.

regexPatternback to summary
private final boolean regexPattern

Whether name is a header name or a regular expression pattern that is meant to match header names.

Constructor Detail

FieldMapByNameEntryback to summary
public FieldMapByNameEntry(String name, BeanField<T, String> field, boolean regexPattern)

Initializes the entry.

Parameters
name:String

The name or regular expression pattern representing the header(s)

field:BeanField<T, String>

The field associated with the header(s)

regexPattern:boolean

Whether or not name is a regular expression pattern

Method Detail

getFieldback to summary
public BeanField<T, String> getField()
Returns:BeanField<T, String>

The BeanField associated with this header or these headers

getNameback to summary
public String getName()
Returns:String

The name of the header or a regular expression pattern matching all possible header names

isRegexPatternback to summary
public boolean isRegexPattern()
Returns:boolean

Whether the string returned by getName() is a header name or a regular expression pattern to match header names