<commit_before>package org.cqframework.cql.cql2elm.model;

/**
 * Created by Bryn on 3/2/2017.
 */

// NOTE: Would like to use Apache Maven ComparableVersion, but don't want the dependency of the entire Maven 3.3.1 API...
public class Version implements Comparable<Version> {

    private String version;

    public Version(String version) {
        if(version == null)
            throw new IllegalArgumentException("Version can not be null");
        if(!version.matches("[0-9]+(\\.[0-9]+)*"))
            throw new IllegalArgumentException("Invalid version format");
        this.version = version;
    }

    @Override
    public int compareTo(Version that) {
        if(that == null)
            return 1;<commit_msg>support alphanumeric in version specifier<commit_after>package org.cqframework.cql.cql2elm.model;

/**
 * Created by Bryn on 3/2/2017.
 */

// NOTE: Would like to use Apache Maven ComparableVersion, but don't want the dependency of the entire Maven 3.3.1 API...
public class Version implements Comparable<Version> {

    private String version;

    public Version(String version) {
        if(version == null)
            throw new IllegalArgumentException("Version can not be null");
        if(!version.matches("[0-9A-Za-z]+(\\.[0-9A-Za-z]+)*"))
            throw new IllegalArgumentException("Invalid version format");
        this.version = version;
    }

    @Override
    public int compareTo(Version that) {
        if(that == null)
            return 1;
{'fraction_non_alphanumeric': 0.11440107671601615, 'fraction_numerical': 0.020188425302826378, 'mean_word_length': 2.8030690537084397, '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': '2147048', 'n_tokens_mistral': 428, 'n_tokens_neox': 409, 'n_words': 129}