public class Selector
extends java.lang.Object
implements java.lang.Comparable
Title: Selector
Description: This class represents a selector, that is, a structure "attribute op value"
Constructor and Description |
---|
Selector(int atr,
int op,
double val)
Class employed to store selectors in the form
(attribute operator values)
|
Selector(int atr,
int op,
double[] val)
Class employed to store selectors in the form
(attribute operator values)
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Comparison function between two objects of the class Selector
|
int |
getAttribute()
It returns the attribute id
|
int |
getOperator()
It return the operator id (!
|
double |
getValue()
It returns the value of the associated attribute
|
double[] |
getValues()
It returns the set of values of the selector
|
void |
print()
It shows the content of the selector
attribute - operator - value.
|
void |
setAttribute(int i)
It assigns the attribute
|
void |
setoperator(int i)
It assigns operator
|
void |
setvalue(double f)
It assigns the value
|
void |
setvaluees(double[] f)
It assigns the set of values
|
int |
subsumido(Selector s)
It checks if the values of a selector are subsumed in another
|
public Selector(int atr, int op, double val)
atr
- attributeop
- operatorval
- valuepublic Selector(int atr, int op, double[] val)
atr
- attributeop
- operatorval
- a set of values (disjunts -> at = a or b or c)public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- Selector object to comparepublic int subsumido(Selector s)
s
- Selector Selector to whom we comparepublic int getAttribute()
public int getOperator()
public double getValue()
public double[] getValues()
public void setAttribute(int i)
i
- id of the attributepublic void setoperator(int i)
i
- operator idpublic void setvalue(double f)
f
- valuepublic void setvaluees(double[] f)
f
- valueespublic void print()