<commit_before>package org.ndexbio.model.object.network;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseTerm extends NetworkElement
{
    private String _name;
    private long _namespace;
    
    
    
    /**************************************************************************
    * Default constructor.
    **************************************************************************/
    public BaseTerm()
    {
        super();
        _type = this.getClass().getSimpleName();
    }
    
    
    public String getName()
    {
        return _name;
    }

    public void setName(String termName)
    {
        _name = termName;
    }

    public long getNamespace()
    {
        return _namespace;
    }

    public void setNamespace(long namespace)
    {
        _namespace = namespace;
    }
}<commit_msg>Make BaseTerm comparable and implemnt equals and hashCode.<commit_after>package org.ndexbio.model.object.network;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseTerm extends NetworkElement implements Comparable<BaseTerm> 
{
    private String _name;
    private long _namespace;
    
    
    
    /**************************************************************************
    * Default constructor.
    **************************************************************************/
    public BaseTerm()
    {
        super();
        _type = this.getClass().getSimpleName();
    }
    
    
    public String getName()
    {
        return _name;
    }

    public void setName(String termName)
    {
        _name = termName;
    }

    public long getNamespace()
    {
        return _namespace;
    }

    public void setNamespace(long namespace)
    {
        _namespace = namespace;
    }


	public int compareTo(BaseTerm o) {
		long c = this.getId() - o.getId();
		if ( c==0)
			return 0;
		return c>0? 1 : -1;
		
	}
	
	public int hasCode() {
		return (int)getId();
	}
	
	public boolean Equals (Object b2) {
		if (b2 instanceof BaseTerm)
			return compareTo((BaseTerm)b2)==0;
		return false;
	}
}
{'fraction_non_alphanumeric': 0.21553308823529413, 'fraction_numerical': 0.004136029411764706, 'mean_word_length': 2.8599290780141846, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1370625', 'n_tokens_mistral': 617, 'n_tokens_neox': 573, 'n_words': 135}