<commit_before>package com.uxxu.konashi.lib.util;

import com.uxxu.konashi.lib.Konashi;

/**
 * Created by izumin on 9/21/15.
 */
public final class I2cUtils {
    private I2cUtils() {
        throw new AssertionError("constructor of the utility class should not be called");
    }

    public static boolean isValidMode(int mode) {
        return (mode == Konashi.I2C_DISABLE) || (mode == Konashi.I2C_ENABLE)
                || (mode == Konashi.I2C_ENABLE_100K) || (mode == Konashi.I2C_ENABLE_400K);
    }
}<commit_msg>Add I2cUtils.isValidCondition()<commit_after>package com.uxxu.konashi.lib.util;

import com.uxxu.konashi.lib.Konashi;

/**
 * Created by izumin on 9/21/15.
 */
public final class I2cUtils {
    private I2cUtils() {
        throw new AssertionError("constructor of the utility class should not be called");
    }

    public static boolean isValidMode(int mode) {
        return (mode == Konashi.I2C_DISABLE) || (mode == Konashi.I2C_ENABLE)
                || (mode == Konashi.I2C_ENABLE_100K) || (mode == Konashi.I2C_ENABLE_400K);
    }

    public static boolean isValidCondition(int condition) {
        return (condition == Konashi.I2C_START_CONDITION) || (condition == Konashi.I2C_STOP_CONDITION)
                || (condition == Konashi.I2C_RESTART_CONDITION);
    }
}
{'fraction_non_alphanumeric': 0.11987625676720805, 'fraction_numerical': 0.029389017788089715, 'mean_word_length': 3.2012987012987013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6543023', 'n_tokens_mistral': 452, 'n_tokens_neox': 429, 'n_words': 93}