public abstract class Attribute
extends java.lang.Object
implements scala.Serializable
Constructor and Description |
---|
Attribute() |
Modifier and Type | Method and Description |
---|---|
abstract AttributeType |
attrType()
Attribute type.
|
abstract scala.Option<java.lang.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<java.lang.String> |
name()
Name of the attribute.
|
Metadata |
toMetadata()
Converts to ML metadata
|
Metadata |
toMetadata(Metadata existingMetadata)
Converts to ML metadata with some existing metadata.
|
java.lang.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(java.lang.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<java.lang.String> name()
public abstract Attribute withName(java.lang.String name)
public abstract Attribute withoutName()
public abstract scala.Option<java.lang.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 java.lang.String toString()
toString
in class java.lang.Object