<commit_before>package com.matthewtamlin.spyglass.library.handler_adapters;

import android.content.res.ColorStateList;
import android.content.res.TypedArray;

import com.matthewtamlin.spyglass.library.handler_annotations.ColorStateListHandler;

import static com.matthewtamlin.java_utilities.checkers.NullChecker.checkNotNull;

public class ColorStateListHandlerAdapter
		implements HandlerAdapter<ColorStateList, ColorStateListHandler> {
	@Override
	public boolean attributeValueIsAvailable(
			final TypedArray attrs,
			final ColorStateListHandler annotation) {

		checkNotNull(attrs, "Argument \'attrs\' cannot be null.");
		checkNotNull(annotation, "Argument \'annotation\' cannot be null.");

		return attrs.getColorStateList(annotation.attributeId()) != null;
	}

	@Override<commit_msg>Added @Tested annotation<commit_after>package com.matthewtamlin.spyglass.library.handler_adapters;

import android.content.res.ColorStateList;
import android.content.res.TypedArray;

import com.matthewtamlin.java_utilities.testing.Tested;
import com.matthewtamlin.spyglass.library.handler_annotations.ColorStateListHandler;

import static com.matthewtamlin.java_utilities.checkers.NullChecker.checkNotNull;

@Tested(testMethod = "automated")
public class ColorStateListHandlerAdapter
		implements HandlerAdapter<ColorStateList, ColorStateListHandler> {
	@Override
	public boolean attributeValueIsAvailable(
			final TypedArray attrs,
			final ColorStateListHandler annotation) {

		checkNotNull(attrs, "Argument \'attrs\' cannot be null.");
		checkNotNull(annotation, "Argument \'annotation\' cannot be null.");

		return attrs.getColorStateList(annotation.attributeId()) != null;
	}

	@Override
{'fraction_non_alphanumeric': 0.08999407933688573, 'fraction_numerical': 0.0, 'mean_word_length': 7.0476190476190474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5222996', 'n_tokens_mistral': 513, 'n_tokens_neox': 480, 'n_words': 95}