public class Item
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
Item()
Default Constructor.
|
Item(int variable,
int value)
Parameters Constructor.
|
Modifier and Type | Method and Description |
---|---|
Item |
clone()
Clone function.
|
int |
compareTo(java.lang.Object a)
Function to compare objects of the Item class.
|
int |
getValue()
It returns the value of the item.
|
int |
getVariable()
It returns the variable of the item.
|
boolean |
isEqual(Item a)
Function to check if an item is equal to another given.
|
void |
setValues(int variable,
int value)
It sets the pair of values to the item.
|
public Item()
public Item(int variable, int value)
variable
- Value which represents an input attribute of a rulevalue
- Value attached to the variablepublic void setValues(int variable, int value)
variable
- Value which represents an input attribute of a rulevalue
- Value attached to the variablepublic int getVariable()
public int getValue()
public Item clone()
clone
in class java.lang.Object
public boolean isEqual(Item a)
a
- Item to compare with ourspublic int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
a
- Item object to compare with.