public class MyAttribute
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CONTINUOUS
Continuous attribute.
|
static int |
DISCRET
Discret attribute.
|
Constructor and Description |
---|
MyAttribute(java.lang.String attributeName)
Constructor for continuous attributes.
|
MyAttribute(java.lang.String attributeName,
int attributeIndex)
Constructor for continuous attributes.
|
MyAttribute(java.lang.String attributeName,
java.util.Vector attributeValues)
Constructor for discret attributes.
|
MyAttribute(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.
|
java.lang.Object |
copy()
Produces a shallow copy of this attribute.
|
void |
enumerate()
Sets the attribute as synthetizied from an enumerate one.
|
boolean |
equals(java.lang.Object other)
Tests if given attribute is equal to this attribute.
|
float |
getMaxRange()
Gets the bigger value of a continuous attribute.
|
float |
getMinRange()
Returns the minor value of a continuous attribute.
|
float |
getType()
Gets the type of the attribute (CONTINUOUS or DISCRET).
|
int |
index()
Returns the index of the 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.
|
boolean |
isEnumerate()
Returns true if this attribute has been synthetizied from an enumerate one.
|
java.lang.String |
name()
Returns the name of the attribute.
|
int |
numValues()
Function to get the number of values of a discret attribute.
|
void |
setIndex(int index)
Sets the index of this 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 MyAttribute(java.lang.String attributeName, int attributeIndex)
attributeName
- the attribute's name.attributeIndex
- the attribute's index.public MyAttribute(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 MyAttribute(java.lang.String attributeName)
attributeName
- the attribute's name.public MyAttribute(java.lang.String attributeName, java.util.Vector attributeValues)
attributeName
- The name of the attribute.attributeValues
- The values of the attributes.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 index()
public final int numValues()
public final java.lang.String value(int valIndex)
valIndex
- The index of the value.public final void setIndex(int index)
index
- the index of this attributepublic final float getMinRange()
public final float getMaxRange()
public final float getType()
public void activate()
public void enumerate()
public boolean isActive()
public boolean isEnumerate()
public java.lang.Object copy()
public final boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the Object to be compared to this attribute