<commit_before>package com.droidworker.pulltoloadview.constant;

/**
 * 加载模式
 * @author https://github.com/DroidWorkerLYF
 */
public enum LoadMode {
    /**
     * 从头部拉动,加载更新
     */
    START,
    /**
     * 从头部拉动加载更新,自动加载更多
     */
    START_AUTO_LOAD_MORE,
    /**
     * 从头部拉动加载更新,自动加载更多
     */
    START_AUTO_LOAD_MORE_WITH_FOOTER,
    /**
     * 自动加载更多
     */
    AUTO_LOAD_MORE_WITH_FOOTER,
    /**
     * 从尾部拉动,加载更多
     */
    END,
    /**
     * 同时支持PULL_FROM_START和PULL_FROM_END
     */
    BOTH,
    /**
     * 禁止拉动
     */
    DISABLED,
    /**
     * 不支持手动
     */
    MANUAL_ONLY;

    public boolean isPullToLoad() {
        return !(this == DISABLED || this == MANUAL_ONLY);
    }

    public boolean isPullFromStart() {
        return this == START || this == BOTH || this == START_AUTO_LOAD_MORE
                || this == START_AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean isPullFromEnd() {
        return this == END || this == BOTH;
    }

    public boolean shouldShowHeader() {
        return this == START || this == MANUAL_ONLY || this == START_AUTO_LOAD_MORE || this == BOTH;
    }

    public boolean shouldShowFooter() {
        return this == END || this == BOTH;
    }

    public boolean canOverScrollStart() {
        return this == MANUAL_ONLY || this == END || this == DISABLED
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean canOverScrollEnd() {
        return this == START || this == MANUAL_ONLY || this == DISABLED
                || this == START_AUTO_LOAD_MORE || this == START_AUTO_LOAD_MORE_WITH_FOOTER
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean isAutoLoadMore() {
        return this == START_AUTO_LOAD_MORE || this == START_AUTO_LOAD_MORE_WITH_FOOTER
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean shouldShowAutoLoadMoreFooter() {
        return this == START_AUTO_LOAD_MORE_WITH_FOOTER || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }
}<commit_msg>补全满足showheader的mode<commit_after>package com.droidworker.pulltoloadview.constant;

/**
 * 加载模式
 * @author https://github.com/DroidWorkerLYF
 */
public enum LoadMode {
    /**
     * 从头部拉动,加载更新
     */
    START,
    /**
     * 从头部拉动加载更新,自动加载更多
     */
    START_AUTO_LOAD_MORE,
    /**
     * 从头部拉动加载更新,自动加载更多
     */
    START_AUTO_LOAD_MORE_WITH_FOOTER,
    /**
     * 自动加载更多
     */
    AUTO_LOAD_MORE_WITH_FOOTER,
    /**
     * 从尾部拉动,加载更多
     */
    END,
    /**
     * 同时支持PULL_FROM_START和PULL_FROM_END
     */
    BOTH,
    /**
     * 禁止拉动
     */
    DISABLED,
    /**
     * 不支持手动
     */
    MANUAL_ONLY;

    public boolean isPullToLoad() {
        return !(this == DISABLED || this == MANUAL_ONLY);
    }

    public boolean isPullFromStart() {
        return this == START || this == BOTH || this == START_AUTO_LOAD_MORE
                || this == START_AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean isPullFromEnd() {
        return this == END || this == BOTH;
    }

    public boolean shouldShowHeader() {
        return this == START || this == MANUAL_ONLY || this == START_AUTO_LOAD_MORE
                || this == START_AUTO_LOAD_MORE_WITH_FOOTER || this == BOTH;
    }

    public boolean shouldShowFooter() {
        return this == END || this == BOTH;
    }

    public boolean canOverScrollStart() {
        return this == MANUAL_ONLY || this == END || this == DISABLED
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean canOverScrollEnd() {
        return this == START || this == MANUAL_ONLY || this == DISABLED
                || this == START_AUTO_LOAD_MORE || this == START_AUTO_LOAD_MORE_WITH_FOOTER
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean isAutoLoadMore() {
        return this == START_AUTO_LOAD_MORE || this == START_AUTO_LOAD_MORE_WITH_FOOTER
                || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }

    public boolean shouldShowAutoLoadMoreFooter() {
        return this == START_AUTO_LOAD_MORE_WITH_FOOTER || this == AUTO_LOAD_MORE_WITH_FOOTER;
    }
}
{'fraction_non_alphanumeric': 0.11280039234919079, 'fraction_numerical': 0.0, 'mean_word_length': 2.2347343378271214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3406657', 'n_tokens_mistral': 1537, 'n_tokens_neox': 1495, 'n_words': 238}