public class Trio
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
Trio()
Default constructor.
|
Trio(double clave)
Constructs a Trio with the given value and 0 instaces for both positives and negatives.
|
Modifier and Type | Method and Description |
---|---|
void |
addNegative()
Increases the number of negative instances of a given dataset that contains the value.
|
void |
addPositive()
Increases the number of positive instances of a given dataset that contains the value.
|
int |
compareTo(java.lang.Object o) |
double |
getKey()
Returns the attribute's value.
|
int |
getNegative()
Returns the number of negative instances of a given dataset that contains the value.
|
int |
getPositive()
Returns the number of positive instances of a given dataset that contains the value.
|
void |
setKey(double clave)
Sets the attribute'value to a new value.
|
java.lang.String |
toString()
Returns a string that represent a Trio.
|
java.lang.String |
toString(int i)
Returns a string that represent a Trio, taking into account the given attribute's id.
|
public Trio()
public Trio(double clave)
clave
- the attribute's value.public double getKey()
public int getPositive()
public int getNegative()
public void setKey(double clave)
clave
- the new attribute's value.public void addPositive()
public void addNegative()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int i)
i
- int the attribute's id.public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable