public final class LayoutConflictResolver extends Object
LayoutRule.priority() always
wins over a lower-priority write, regardless of registration order.LayoutRulePipeline applies rules in registration order, this
means a later-registered rule of equal priority overrides an earlier
one. This is implemented as accept = incoming >= current.The resolver is stateless; LayoutContext keeps the per-property
winning priority and consults this resolver on each requested write.
Plan reference: §7.3/S23, §7.4/S23.
| Constructor and Description |
|---|
LayoutConflictResolver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(int incomingPriority,
int currentPriority)
Whether an incoming write at
incomingPriority should overwrite the
existing decision set at currentPriority. |
public LayoutConflictResolver()
public boolean accept(int incomingPriority, int currentPriority)
incomingPriority should overwrite the
existing decision set at currentPriority. currentPriority
is Integer.MIN_VALUE when the property is still undecided.true iff incomingPriority >= currentPriority