| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ComparisonResult | Returns: ComparisonResult indicating which year is more plausible: RIGHT_BETTER, LEFT_BETTER, or UNDETERMINEDvalue from the library (or candidate) leftValue, String value from the fetcher (or existing record) rightValue)Implements org. Compares the plausibility of two field values. |
| private Optional | Returns: Optional containing the 4-digit year if found, otherwise Optional.empty()the input string possibly containing a year value)Extracts the first 4-digit number found in the string. |
| YEAR_PATTERN | back to summary |
|---|---|
| private static final Pattern YEAR_PATTERN | |
| YearFieldValuePlausibilityComparator | back to summary |
|---|---|
| pack-priv YearFieldValuePlausibilityComparator() | |
| compare | back to summary |
|---|---|
| public ComparisonResult compare(String leftValue, String rightValue) Implements org. Compares the plausibility of two field values.
| |
| extractYear | back to summary |
|---|---|
| private Optional Extracts the first 4-digit number found in the string. Used to identify year-like values such as "About 2000" or "Published in 1999". | |