public class Selector
extends java.lang.Object
implements java.lang.Comparable
Class to stores selectors with the form (attribute operator values)
Constructor and Description |
---|
Selector(int atr,
int op,
double val)
Class to stores selectors with the form (attribute operator values)
|
Selector(int atr,
int op,
double[] val)
Class to stores selectors with the form (attribute operator values
|
Selector(int atr,
int op,
java.lang.String val,
boolean nominal)
Class to stores selectors with the form (attribute operator values), where values are nominal
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Function to compare two objects of the selector class
|
int |
getAtributo()
Returns the attribute's id
|
int |
getOperador()
Return the operator's id
|
double |
getValor()
Return the attribute's value associated
|
double[] |
getValores()
Returns the set of values of the selector
|
java.lang.String[] |
getValoresN()
Return the set of nominal values of the selector
|
java.lang.String |
getValorN()
Returns the nominal value of the associated value
|
void |
print()
Shows the content of a selector: attribute-operator-value
|
void |
setAtributo(int i)
Assign the attribute
|
void |
setOperador(int i)
Assign the operator
|
void |
setValor(double f)
Assign the value
|
void |
setValores(double[] f)
Assign the values
|
public Selector(int atr, int op, double val)
Class to stores selectors with the form (attribute operator values)
atr
- attributeop
- operatorval
- valuepublic Selector(int atr, int op, java.lang.String val, boolean nominal)
Class to stores selectors with the form (attribute operator values), where values are nominal
atr
- atributeop
- operatorval
- valuenominal
- true indicate values are nominalpublic Selector(int atr, int op, double[] val)
Class to stores selectors with the form (attribute operator values
atr
- attributeop
- operatorval
- set of values (disjunct -> at = a b c)public int compareTo(java.lang.Object o)
Function to compare two objects of the selector class
compareTo
in interface java.lang.Comparable
o
- Objeto Seclector to comparepublic int getAtributo()
Returns the attribute's id
public int getOperador()
Return the operator's id
public double getValor()
Return the attribute's value associated
public java.lang.String getValorN()
Returns the nominal value of the associated value
public double[] getValores()
Returns the set of values of the selector
public java.lang.String[] getValoresN()
Return the set of nominal values of the selector
public void setAtributo(int i)
Assign the attribute
i
- atribute's valuepublic void setOperador(int i)
Assign the operator
i
- value of the operatorpublic void setValor(double f)
Assign the value
f
- valuepublic void setValores(double[] f)
Assign the values
f
- valuespublic void print()
Shows the content of a selector: attribute-operator-value