public class Condicion
extends java.lang.Object
Title: Condicion (Condition)
Description: Contains a value for an attribute and an operator (=,>,<) to be assigned to a rule
Constructor and Description |
---|
Condicion()
Default constructor.
|
Condicion(Atributo at,
int op)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cubre(Atributo at)
Checks if the attribute given is covered by the condition.
|
static ComparadorCondicion |
getComparadorCondiciones()
Returns the Condition comparative method.
|
int |
getIndice()
Returns the attribute id.
|
int |
getOperador()
Returns the operator of this condition.
|
Atributo |
getValor()
Returns the value for the attribute of this condition.
|
void |
setOperador(int op)
Sets the operator with the value given.
|
void |
setValor(Atributo at)
Sets the value for the attribute given.
|
boolean |
tieneValor(int indice,
int op)
Checks if the pair attribute id and operator given are the one set on this condition.
|
public Condicion()
public Condicion(Atributo at, int op)
at
- attribute to be set.op
- operator used 0(=), 1(<), 2(>).public void setValor(Atributo at)
at
- Atribute
with the value and the attribute to be set.public void setOperador(int op)
op
- given operator operator used 0(=), 1(<), 2(>).public Atributo getValor()
public int getOperador()
public int getIndice()
public boolean cubre(Atributo at)
at
- given attribute.public boolean tieneValor(int indice, int op)
indice
- given attribute id.op
- given operator.public static ComparadorCondicion getComparadorCondiciones()