![JAR search and dependency download from the Maven repository](/logo.png)
es.uam.eps.ir.relison.diffusion.data.Feature Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2020 Information Retrieval Group at Universidad Autónoma
* de Madrid, http://ir.ii.uam.es
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package es.uam.eps.ir.relison.diffusion.data;
import java.util.Objects;
/**
* Class for the parameters we want to measure at evaluation. By now, although its values can be
* variated, they are treated as nominal values.
*
* @author Javier Sanz-Cruzado ([email protected])
* @author Pablo Castells ([email protected])
*
* @param parameter for the information.
*/
public class Feature implements Cloneable
{
/**
* Value of the parameter.
*/
private final F value;
/**
* Constructor.
* @param value Value of the parameter.
*/
public Feature(F value)
{
this.value = value;
}
@Override
public boolean equals(Object obj)
{
if(obj.getClass().equals(this.getClass()))
{
Feature instance = (Feature) obj;
return instance.value.equals(this.value);
}
return false;
}
@Override
public int hashCode()
{
int hash = 3;
hash = 17 * hash + Objects.hashCode(this.value);
return hash;
}
@Override
public Feature clone() throws CloneNotSupportedException
{
return (Feature) super.clone();
}
/**
* Obtains the value of the parameter.
* @return the value.
*/
public F getValue()
{
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy