Package com.opencsv.bean
Class FieldMapByNameEntry<T>
- java.lang.Object
-
- com.opencsv.bean.FieldMapByNameEntry<T>
-
- Type Parameters:
T
- The type of the bean being converted
public class FieldMapByNameEntry<T> extends java.lang.Object
Represents one entry inFieldMapByName
. Note: This is not used in the internal structure ofFieldMapByName
, but rather when representing its contents to the outside world.- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description private BeanField<T,java.lang.String>
field
TheBeanField
associated with this header or these headers.private java.lang.String
name
The name of the header or a regular expression pattern matching possible names for the header.private boolean
regexPattern
Whethername
is a header name or a regular expression pattern that is meant to match header names.
-
Constructor Summary
Constructors Constructor Description FieldMapByNameEntry(java.lang.String name, BeanField<T,java.lang.String> field, boolean regexPattern)
Initializes the entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanField<T,java.lang.String>
getField()
java.lang.String
getName()
boolean
isRegexPattern()
-
-
-
Field Detail
-
name
private final java.lang.String name
The name of the header or a regular expression pattern matching possible names for the header.
-
field
private final BeanField<T,java.lang.String> field
TheBeanField
associated with this header or these headers.
-
regexPattern
private final boolean regexPattern
Whethername
is a header name or a regular expression pattern that is meant to match header names.
-
-
Constructor Detail
-
FieldMapByNameEntry
public FieldMapByNameEntry(java.lang.String name, BeanField<T,java.lang.String> field, boolean regexPattern)
Initializes the entry.- Parameters:
name
- The name or regular expression pattern representing the header(s)field
- The field associated with the header(s)regexPattern
- Whether or notname
is a regular expression pattern
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- The name of the header or a regular expression pattern matching all possible header names
-
getField
public BeanField<T,java.lang.String> getField()
- Returns:
- The
BeanField
associated with this header or these headers
-
isRegexPattern
public boolean isRegexPattern()
- Returns:
- Whether the string returned by
getName()
is a header name or a regular expression pattern to match header names
-
-