<commit_before>package com.mikepenz.fastadapter.swipe

import androidx.recyclerview.widget.ItemTouchHelper

internal fun ISwipeable.getSwipeDirs(dirs: Int): Int {
    var dirs = dirs
    if (!isDirectionSupported(ItemTouchHelper.LEFT)) {
        dirs = dirs and ItemTouchHelper.LEFT.inv()
    }
    if (!isDirectionSupported(ItemTouchHelper.RIGHT)) {
        dirs = dirs and ItemTouchHelper.RIGHT.inv()
    }
    return dirs
}<commit_msg>- add javadoc<commit_after>package com.mikepenz.fastadapter.swipe

import androidx.recyclerview.widget.ItemTouchHelper

/**
 * Retrieve the swipe directions allowed for this [ISwipeable] element.
 */
internal fun ISwipeable.getSwipeDirs(dirs: Int): Int {
    var directions = dirs
    if (!isDirectionSupported(ItemTouchHelper.LEFT)) {
        directions = dirs and ItemTouchHelper.LEFT.inv()
    }
    if (!isDirectionSupported(ItemTouchHelper.RIGHT)) {
        directions = dirs and ItemTouchHelper.RIGHT.inv()
    }
    return directions
}
{'fraction_non_alphanumeric': 0.09795918367346938, 'fraction_numerical': 0.0, 'mean_word_length': 3.92964824120603, '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': '2897336', 'n_tokens_mistral': 309, 'n_tokens_neox': 306, 'n_words': 63}