final class PerFieldMergeState
extends java.lang.Object
MergeState instance to be restricted to a set of fields.
Warning: the input MergeState instance will be updated when calling apply(Collection).
It should be called within a try {...} finally {...} block to make sure that the mergeState instance is
restored to its original state:
PerFieldMergeState pfMergeState = new PerFieldMergeState(mergeState);
try {
doSomething(pfMergeState.apply(fields));
...
} finally {
pfMergeState.reset();
}
| Modifier and Type | Class and Description |
|---|---|
private static class |
PerFieldMergeState.FilterFieldInfos |
private static class |
PerFieldMergeState.FilterFieldsProducer |
| Modifier and Type | Field and Description |
|---|---|
private MergeState |
in |
private FieldInfos[] |
orgFieldInfos |
private FieldsProducer[] |
orgFieldsProducers |
private FieldInfos |
orgMergeFieldInfos |
| Constructor and Description |
|---|
PerFieldMergeState(MergeState in) |
| Modifier and Type | Method and Description |
|---|---|
(package private) MergeState |
apply(java.util.Collection<java.lang.String> fields)
Update the input
MergeState instance to restrict the fields to the given ones. |
(package private) MergeState |
reset()
Resets the input
MergeState instance to its original state. |
private final MergeState in
private final FieldInfos orgMergeFieldInfos
private final FieldInfos[] orgFieldInfos
private final FieldsProducer[] orgFieldsProducers
PerFieldMergeState(MergeState in)
MergeState apply(java.util.Collection<java.lang.String> fields)
MergeState instance to restrict the fields to the given ones.fields - The fields to keep in the updated instance.MergeState reset()
MergeState instance to its original state.