public class Item
extends java.lang.Object
implements java.lang.Comparable
Title: Item
Description: This class contains the representation of a item
Copyright: Copyright KEEL (c) 2007
Company: KEEL
Constructor and Description |
---|
Item()
Default constructor.
|
Item(int variable,
int value)
Builder
|
Modifier and Type | Method and Description |
---|---|
Item |
clone() |
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)
Builder
variable
- Variablevalue
- Value or Label of the variablepublic void setValues(int variable, int value)
It sets the pair of values to the item
variable
- Value which represents an input attribute of a rulevalue
- Value attached to the variablepublic int getVariable()
It returns the variable of the item
public int getValue()
It returns the value of the item
public Item clone()
clone
in class java.lang.Object
public boolean isEqual(Item a)
Function to check if an item is equal to another given
a
- Item to compare with ourspublic int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
a
- Item object to compare with.