public abstract class Attribute
extends Object
implements scala.Serializable
Constructor and Description |
---|
Attribute() |
Modifier and Type | Method and Description |
---|---|
abstract AttributeType |
attrType()
Attribute type.
|
abstract scala.Option<Object> |
index()
Index of the attribute.
|
abstract boolean |
isNominal()
Tests whether this attribute is nominal, true for
NominalAttribute and BinaryAttribute . |
abstract boolean |
isNumeric()
Tests whether this attribute is numeric, true for
NumericAttribute and BinaryAttribute . |
abstract scala.Option<String> |
name()
Name of the attribute.
|
Metadata |
toMetadata()
Converts to ML metadata
|
Metadata |
toMetadata(Metadata existingMetadata)
Converts to ML metadata with some existing metadata.
|
String |
toString() |
StructField |
toStructField()
Converts to a
StructField . |
StructField |
toStructField(Metadata existingMetadata)
Converts to a
StructField with some existing metadata. |
abstract Attribute |
withIndex(int index)
Copy with a new index.
|
abstract Attribute |
withName(String name)
Copy with a new name.
|
abstract Attribute |
withoutIndex()
Copy without the index.
|
abstract Attribute |
withoutName()
Copy without the name.
|
public abstract AttributeType attrType()
public abstract scala.Option<String> name()
public abstract Attribute withName(String name)
public abstract Attribute withoutName()
public abstract scala.Option<Object> index()
public abstract Attribute withIndex(int index)
public abstract Attribute withoutIndex()
public abstract boolean isNumeric()
NumericAttribute
and BinaryAttribute
.public abstract boolean isNominal()
NominalAttribute
and BinaryAttribute
.public Metadata toMetadata(Metadata existingMetadata)
public Metadata toMetadata()
public StructField toStructField(Metadata existingMetadata)
StructField
with some existing metadata.existingMetadata
- existing metadata to carry overpublic StructField toStructField()
StructField
.public String toString()
toString
in class Object