public class Literal
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
Literal()
Default Constructor
|
Literal(int variable,
int value)
Parameters Constructor
|
Modifier and Type | Method and Description |
---|---|
Literal |
clone()
Clone function.
|
int |
compareTo(java.lang.Object a)
Function neccessary to sort literals.
|
double |
getGain()
It returns the gain of the literal
|
int |
getValue()
It returns the value of the attribute stored in the literal
|
int |
getVariable()
It returns the attribute stored in the literal
|
void |
setGain(double value)
It sets the gain for a literal
|
void |
setValues(int variable,
int value)
It sets the values for a literal
|
public Literal()
Default Constructor
public Literal(int variable, int value)
Parameters Constructor
variable
- int Attribute of the literalvalue
- int Associated value to an attributepublic void setValues(int variable, int value)
It sets the values for a literal
variable
- int Attribute of the literalvalue
- int Associated value to an attributepublic void setGain(double value)
It sets the gain for a literal
value
- Gain to setpublic int getVariable()
It returns the attribute stored in the literal
public int getValue()
It returns the value of the attribute stored in the literal
public double getGain()
It returns the gain of the literal
public Literal clone()
clone
in class java.lang.Object
public int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
a
- Literal object to compare with.