public class BinaryAttribute extends Attribute
Modifier and Type | Method and Description |
---|---|
AttributeType |
attrType()
Attribute type.
|
static BinaryAttribute |
defaultAttr()
The default binary attribute.
|
boolean |
equals(Object other) |
int |
hashCode() |
scala.Option<Object> |
index()
Index of the attribute.
|
boolean |
isNominal()
Tests whether this attribute is nominal, true for
NominalAttribute and BinaryAttribute . |
boolean |
isNumeric()
Tests whether this attribute is numeric, true for
NumericAttribute and BinaryAttribute . |
scala.Option<String> |
name()
Name of the attribute.
|
static Metadata |
toMetadata() |
static Metadata |
toMetadata(Metadata existingMetadata) |
static String |
toString() |
static StructField |
toStructField() |
static StructField |
toStructField(Metadata existingMetadata) |
scala.Option<String[]> |
values() |
BinaryAttribute |
withIndex(int index)
Copy with a new index.
|
BinaryAttribute |
withName(String name)
Copy with a new name.
|
BinaryAttribute |
withoutIndex()
Copy without the index.
|
BinaryAttribute |
withoutName()
Copy without the name.
|
BinaryAttribute |
withoutValues()
Copy without the values.
|
BinaryAttribute |
withValues(String negative,
String positive)
Copy with new values.
|
toMetadata, toMetadata, toString, toStructField, toStructField
public static final BinaryAttribute defaultAttr()
public static Metadata toMetadata()
public static StructField toStructField(Metadata existingMetadata)
public static StructField toStructField()
public static String toString()
public scala.Option<String> name()
Attribute
public scala.Option<Object> index()
Attribute
public scala.Option<String[]> values()
public AttributeType attrType()
Attribute
public boolean isNumeric()
Attribute
NumericAttribute
and BinaryAttribute
.public boolean isNominal()
Attribute
NominalAttribute
and BinaryAttribute
.public BinaryAttribute withName(String name)
Attribute
public BinaryAttribute withoutName()
Attribute
withoutName
in class Attribute
public BinaryAttribute withIndex(int index)
Attribute
public BinaryAttribute withoutIndex()
Attribute
withoutIndex
in class Attribute
public BinaryAttribute withValues(String negative, String positive)
negative
- name for negativepositive
- name for positivepublic BinaryAttribute withoutValues()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object