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
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.- Since:
- 4.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionTheBeanField
associated with this header or these headers.private final String
The name of the header or a regular expression pattern matching possible names for the header.private final boolean
Whethername
is a header name or a regular expression pattern that is meant to match header names. -
Constructor Summary
ConstructorsConstructorDescriptionFieldMapByNameEntry
(String name, BeanField<T, String> field, boolean regexPattern) Initializes the entry. -
Method Summary
-
Field Details
-
name
The name of the header or a regular expression pattern matching possible names for the header. -
field
TheBeanField
associated with this header or these headers. -
regexPattern
private final boolean regexPatternWhethername
is a header name or a regular expression pattern that is meant to match header names.
-
-
Constructor Details
-
FieldMapByNameEntry
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 Details
-
getName
- Returns:
- The name of the header or a regular expression pattern matching all possible header names
-
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
-