nz.ac.waikato.mcennis.rat.reusablecores.instancefactory
Class StringInstanceFactory
java.lang.Object
nz.ac.waikato.mcennis.rat.reusablecores.instancefactory.StringInstanceFactory
- All Implemented Interfaces:
- InstanceFactory
public class StringInstanceFactory
- extends java.lang.Object
- implements InstanceFactory
Class for transforming a String into an Instance from a property of name 'name'.
This transformation creates a single nominal attribute with only the given string
as an option. It is assumed that concatentation or normalization operations
will combine attributes into a more useful nominal attribute.
Method Summary |
StringInstanceFactory |
prototype()
|
Instance |
transform(java.lang.Object value,
java.lang.String name)
Transform an object into an Instance where the name of the dataset and the
names of the attributes are derived from the name provided. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringInstanceFactory
public StringInstanceFactory()
transform
public Instance transform(java.lang.Object value,
java.lang.String name)
- Description copied from interface:
InstanceFactory
- Transform an object into an Instance where the name of the dataset and the
names of the attributes are derived from the name provided.
- Specified by:
transform
in interface InstanceFactory
- Parameters:
value
- Property value to be transformedname
- string utilized to derive a dataset name and attribute names.
- Returns:
- Instance representing this object
prototype
public StringInstanceFactory prototype()
- Specified by:
prototype
in interface InstanceFactory