Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm.data
Class AttributeInstance

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.data.Attribute
              |
              +--oracle.dmt.odm.data.AttributeInstance
All Implemented Interfaces:
java.io.Serializable

public class AttributeInstance
extends Attribute

An instance of AttributeInstance supports providing named and typed values as input for various functions. This class is currently used in conjunction with RecordInstance. AttributeInstance supports the three data types String, int, and float.

Since:
9.0.1
See Also:
Serialized Form

Constructor Summary
AttributeInstance(java.lang.String attributeName)
          Constructs an attribute instance with null value.
AttributeInstance(java.lang.String attributeName, float value)
          Constructs a float instance with the specified name and value.
AttributeInstance(java.lang.String attributeName, int value)
          Constructs an integer instance with the specified name and value.
AttributeInstance(java.lang.String attributeName, java.lang.String value)
          Constructs a string instance with the specified name and value.

 

Method Summary
 float getFloatValue()
          If data type is float, return the stored float value.
 int getIntValue()
          If data type is int, return the stored integer value.
 java.lang.String getStringValue()
          If data type is String, return the stored String value; otherwise return null.
 boolean isNullValue()
          Returns true if the value is null.

 

Methods inherited from class oracle.dmt.odm.data.Attribute
equals, getDataType, getName, setDataType

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AttributeInstance

public AttributeInstance(java.lang.String attributeName,
                         int value)
                  throws InvalidArgumentException,
ODMException
Constructs an integer instance with the specified name and value.
Parameters:
attributeName - attribute name
value - int type attribute value
Throws:
InvalidArgumentException - is thrown
- when the attributeName/type are null
- when the attributeName > 30 bytes
InvalidArgumentException
ODMException

AttributeInstance

public AttributeInstance(java.lang.String attributeName,
                         float value)
                  throws InvalidArgumentException,
ODMException
Constructs a float instance with the specified name and value.
Parameters:
attributeName - attribute name
value - float type attribute value
Throws:
InvalidArgumentException - is thrown
- when the attributeName/type are null
- when the attributeName > 30 bytes
InvalidArgumentException
ODMException

AttributeInstance

public AttributeInstance(java.lang.String attributeName)
                  throws InvalidArgumentException,
ODMException
Constructs an attribute instance with null value.
Parameters:
attributeName - attribute name
Throws:
InvalidArgumentException - is thrown
- when the attributeName/type are null
- when the attributeName > 30 bytes
InvalidArgumentException
ODMException

AttributeInstance

public AttributeInstance(java.lang.String attributeName,
                         java.lang.String value)
                  throws InvalidArgumentException,
ODMException
Constructs a string instance with the specified name and value.
Parameters:
attributeName - attribute name
value - string type attribute value
Throws:
InvalidArgumentException - is thrown
- when the attributeName/type are null
- when the attributeName > 30 bytes
InvalidArgumentException
ODMException
Method Detail

getIntValue

public int getIntValue()
If data type is int, return the stored integer value.
Returns:
attribute value
Throws:
NumberFormatException - is thrown
- if the string does not contain a parsable integer

getFloatValue

public float getFloatValue()
If data type is float, return the stored float value.
Returns:
attribute value
Throws:
NumberFormatException - is thrown
- if the string does not contain a parsable float

getStringValue

public java.lang.String getStringValue()
If data type is String, return the stored String value; otherwise return null.
Returns:
attribute value

isNullValue

public boolean isNullValue()
Returns true if the value is null. Otherwise, returns false.
Returns:
true if the value is null.

Copyright © 2003 Oracle Corporation. All Rights Reserved.