Interface StatementSupport.StatementEquality<A,D extends DeclaredStatement<A>>
- Type Parameters:
A- Argument typeD- Declared Statement representation
- Enclosing class:
- StatementSupport<A,
D extends DeclaredStatement<A>, E extends EffectiveStatement<A, D>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface StatementSupport.StatementEquality<A,D extends DeclaredStatement<A>>
Abstract base class for comparators associated with statements with a
StatementSupport.CopyPolicy.DECLARED_COPY copy
policy.-
Method Summary
Modifier and TypeMethodDescriptionbooleancanReuseCurrent(@NonNull EffectiveStmtCtx.Current<A, D> copy, @NonNull EffectiveStmtCtx.Current<A, D> current, @NonNull List<? extends EffectiveStatement<?, ?>> substatements) Determine whethercurrentstatement has the same semantics as the provided copy.
-
Method Details
-
canReuseCurrent
boolean canReuseCurrent(@NonNull EffectiveStmtCtx.Current<A, D> copy, @NonNull EffectiveStmtCtx.Current<A, D> current, @NonNull List<? extends EffectiveStatement<?, ?>> substatements) Determine whethercurrentstatement has the same semantics as the provided copy. See the contract specification ofStatementFactory.canReuseCurrent(Current, Current, List).- Parameters:
copy- Copy of current effective contextcurrent- Current effective contextsubstatements- Current effective substatements- Returns:
- True if
currentcan be reused in place ofcopy, false if the copy needs to be used.
-