<commit_before>/*
 * Copyright 2014-2016 Web Firm Framework
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.webfirmframework.wffweb.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

import com.webfirmframework.wffweb.InvalidValueException;
import com.webfirmframework.wffweb.NullValueException;

/**
 *
 * @author WFF
 * @since 1.0.0
 */
public class CssValueUtil {

    private CssValueUtil() {
        throw new AssertionError();
    }

    private static final Map<String, String> CSS_VALUE_PART_START_END_VALUES;

    static {
        CSS_VALUE_PART_START_END_VALUES = new HashMap<String, String>();
        CSS_VALUE_PART_START_END_VALUES.put("rgb(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("rgba(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("hsl(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("hsla(", ")");
    }

    /**
     * The given value is used by Web Firm Framework Index Based Extraction
     * algorithm to extract css value parts, i.e. the
     * {@code CssValueUtil#split(String)} is extracting values based on the
     * given values. </br>
     * Eg :-
     *<commit_msg>Formatted code for readability<commit_after>/*
 * Copyright 2014-2016 Web Firm Framework
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.webfirmframework.wffweb.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

import com.webfirmframework.wffweb.InvalidValueException;
import com.webfirmframework.wffweb.NullValueException;

/**
 *
 * @author WFF
 * @since 1.0.0
 */
public class CssValueUtil {

    private static final Map<String, String> CSS_VALUE_PART_START_END_VALUES;

    static {
        CSS_VALUE_PART_START_END_VALUES = new HashMap<String, String>();
        CSS_VALUE_PART_START_END_VALUES.put("rgb(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("rgba(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("hsl(", ")");
        CSS_VALUE_PART_START_END_VALUES.put("hsla(", ")");
    }

    private CssValueUtil() {
        throw new AssertionError();
    }

    /**
     * The given value is used by Web Firm Framework Index Based Extraction
     * algorithm to extract css value parts, i.e. the
     * {@code CssValueUtil#split(String)} is extracting values based on the
     * given values. </br>
     * Eg :-
     *
{'fraction_non_alphanumeric': 0.1006993006993007, 'fraction_numerical': 0.008391608391608392, 'mean_word_length': 3.6441558441558444, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2406183', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1063, 'n_words': 329}