public class Attribute
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CONTINUOUS
Continuous attribute.
|
static int |
DISCRET
Discret attribute.
|
Constructor and Description |
---|
Attribute(java.lang.String attributeName,
int attributeIndex)
Constructor for continuous attributes.
|
Attribute(java.lang.String attributeName,
java.util.Vector attributeValues,
int attributeIndex)
Constructor for discret attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Sets the attribute as used.
|
float |
getMaxRange()
Gets the bigger value of a continuous attribute.
|
float |
getMinRange()
Returns the minor value of a continuous attribute.
|
boolean |
isActive()
Returns true if this attribute used in output or input clause.
|
boolean |
isContinuous()
Returns if the attribute is continuous or not.
|
boolean |
isDiscret()
Returns if the attribute is discret or not.
|
java.lang.String |
name()
Returns the name of the attribute.
|
int |
numValues()
Function to get the number of values of a discret attribute.
|
java.lang.String |
value(int valIndex)
Returns the value with the given index.
|
int |
valueIndex(java.lang.String value)
Function to get the index of a value in the list of values.
|
public static final int CONTINUOUS
public static final int DISCRET
public Attribute(java.lang.String attributeName, int attributeIndex)
attributeName
- attribute name given to be constructed.attributeIndex
- attribute index given to be constructed.public Attribute(java.lang.String attributeName, java.util.Vector attributeValues, int attributeIndex)
attributeName
- The name of the attribute.attributeValues
- The values of the attributes.attributeIndex
- The index of the attribute.public final int valueIndex(java.lang.String value)
value
- The value.public final boolean isDiscret()
public final boolean isContinuous()
public final java.lang.String name()
public final int numValues()
public final java.lang.String value(int valIndex)
valIndex
- The index of the value.public final float getMinRange()
public final float getMaxRange()
public void activate()
public boolean isActive()