<commit_before>package com.giannoules.proxstor.api;

import javax.xml.bind.annotation.XmlRootElement;


/*
 * JAXB representation of a ProxStor sensor
 *
 *      @TODO move out to separate package/jar for client use as well
 *
 */
@XmlRootElement
public class Sensor {
    public String description;
    public SensorType type;
    public String sensorId;
 
    public Sensor() {}
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getSensorId() {
        return sensorId;
    }
    
    public void setSensorId(String sensorId) {
        this.sensorId = sensorId;
    }
    
    public SensorType getType() {
        return type;
    }
    
    public void setType(SensorType type) {
        this.type = type;
    }
}<commit_msg>added typeIdentified, toString(), hashCode(), equals()<commit_after>package com.giannoules.proxstor.api;

import java.util.Objects;
import javax.xml.bind.annotation.XmlRootElement;


/*
 * JAXB representation of a ProxStor sensor
 *
 *      @TODO move out to separate package/jar for client use as well
 *
 */
@XmlRootElement
public class Sensor {
    public String description;
    public SensorType type;
    public String typeIdentifier;
    public String sensorId;
 
    public Sensor() {}
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getSensorId() {
        return sensorId;
    }
    
    public void setSensorId(String sensorId) {
        this.sensorId = sensorId;
    }
    
    public SensorType getType() {
        return type;
    }
    
    public void setType(SensorType type) {
        this.type = type;
    }

    public String getTypeIdentifier() {
        return typeIdentifier;
    }

    public void setTypeIdentifier(String typeIdentifier) {
        this.typeIdentifier = typeIdentifier;
    }
    
    @Override
    public String toString() {
        return sensorId + ": " + type.toString() + " - " + typeIdentifier + "(" + description + ")";
    }
    
    @Override
    public int hashCode() {
        return (type.hashCode() * typeIdentifier.hashCode());
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Sensor other = (Sensor) obj;
        if (this.type != other.type) {
            return false;
        }
        if (!Objects.equals(this.typeIdentifier, other.typeIdentifier)) {
            return false;
        }
        return true;
    }
 
}
{'fraction_non_alphanumeric': 0.09130122214234364, 'fraction_numerical': 0.0, 'mean_word_length': 2.1805714285714286, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, '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': '2772540', 'n_tokens_mistral': 788, 'n_tokens_neox': 785, 'n_words': 206}