null when it had no value
null when it was removed
Returned by everything in jablib that edits entries — cleanups, formatters, group assignment —
so that a caller can report or record what happened. org.
is the same four values as an undoable change, and is built from one of these.
Two changes are equal when they describe the same modification of equal entries — the entry is
compared as BibEntry compares. org. deliberately does
not: a step on the undo stack has to describe that entry object, so it compares the entry by
identity. That difference is why the two are not one type.
| Modifier and Type | Field and Description |
|---|---|
| private final BibEntry | |
| private final Field | |
| private final @Nullable String | newValue
Record Component accessed by newValue(). what the field holds now, ornull when it was removed
|
| private final @Nullable String | oldValue
Record Component accessed by oldValue(). what the field held before, ornull when it had no value
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BibEntry | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public Field | |
| public final int | |
| public @Nullable String | |
| public @Nullable String | |
| public String | toString()
Implements abstract java. Returns a string representation of the record. |
| entry | back to summary |
|---|---|
| private final BibEntry entry Record Component accessed by entry(). the entry whose field changed | |
| field | back to summary |
|---|---|
| private final Field field Record Component accessed by field(). the field that changed | |
| newValue | back to summary |
|---|---|
| private final @Nullable String newValue Record Component accessed by newValue(). what the field holds now, or | |
| oldValue | back to summary |
|---|---|
| private final @Nullable String oldValue Record Component accessed by oldValue(). what the field held before, or | |
| FieldChange | back to summary |
|---|---|
| public FieldChange(BibEntry entry, Field field, @Nullable String oldValue, @Nullable String newValue) | |
| entry | back to summary |
|---|---|
| public BibEntry entry() Record Component getter of entry.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| field | back to summary |
|---|---|
| public Field field() Record Component getter of field.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| newValue | back to summary |
|---|---|
| public @Nullable String newValue() Record Component getter of newValue.
| |
| oldValue | back to summary |
|---|---|
| public @Nullable String oldValue() Record Component getter of oldValue.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |