public class Atributo
extends java.lang.Object
Title: Atributo (Attribute)
Description: Implements the attributes representation used by the ACO algorithm.
Constructor and Description |
---|
Atributo()
Default constructor.
|
Atributo(Atributo original)
Copy Constructor.
|
Atributo(java.lang.String valorOriginal,
int atributoOriginal,
boolean tip)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two attributes.
|
boolean |
equals(java.lang.Object obj)
Checks if this attribute is equal to the one given.
|
boolean |
esIgual(Atributo at)
Checks if this attribute is equal to the one given.
|
int |
getAtributo()
Returns the attribute id represented on this object.
|
boolean |
getTipo()
Returns the attribute type.
|
java.lang.String |
getValor()
Returns the assigned value of the attribute.
|
static ComparadorAtributo |
obtenerComparador()
Returns the compare condition to compare two attributes.
|
void |
setTipo(boolean tip)
Sets the attribute type with the one given: numeric (0) or nominal (1).
|
public Atributo()
public Atributo(java.lang.String valorOriginal, int atributoOriginal, boolean tip)
valorOriginal
- Initial value of the attribute.atributoOriginal
- Identifies the attribute to be represented. (attribute id).tip
- Attribute type: numeric (0) or nominal (1).public Atributo(Atributo original)
original
- Attribute to be copied.public int getAtributo()
public java.lang.String getValor()
public int compare(java.lang.Object o1, java.lang.Object o2)
o1
- Object First attribute to compare with.o2
- Object Second attribute to compare with.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object Attribute to compare with.public boolean esIgual(Atributo at)
at
- Object Attribute to compare with.public static ComparadorAtributo obtenerComparador()
ComparadorAtributo
the compare condition.public boolean getTipo()
public void setTipo(boolean tip)
tip
- given type.