MergedBuilder.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:helper 作者:
@Nonnull
@Override
public MergedSubscriptionBuilder<T> expireIf(@Nonnull BiPredicate<MergedSubscription<T>, T> predicate, @Nonnull ExpiryTestStage... testPoints) {
    Preconditions.checkNotNull(testPoints, "testPoints");
    Preconditions.checkNotNull(predicate, "predicate");
    for (ExpiryTestStage testPoint : testPoints) {
        switch (testPoint) {
            case PRE:
                preExpiryTests.add(predicate);
                break;
            case POST_FILTER:
                midExpiryTests.add(predicate);
                break;
            case POST_HANDLE:
                postExpiryTests.add(predicate);
                break;
            default:
                throw new IllegalArgumentException("Unknown ExpiryTestPoint: " + testPoint);
        }
    }
    return this;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号