|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.converter.WekaAbstractAttribute<W>
public abstract class WekaAbstractAttribute<W extends WekaAbstractAttribute<W>>
WekaAbstractAttribute handles the type of the attribute.
| Field Summary | |
|---|---|
private static int |
NOMINAL_INDEX
The index of the type NOMINAL in
TYPES. |
private static int |
NUMERIC_INDEX
The index of the type NUMERIC in
TYPES. |
private static int |
STRING_INDEX
The index of the type STRING in
TYPES. |
private int |
TYPE
Holds the type of this attribute. |
private static String[] |
TYPES
Collects the possible types of attributes. |
| Fields inherited from interface de.lmu.ifi.dbs.elki.converter.WekaAttribute |
|---|
NOMINAL, NUMERIC, STRING |
| Constructor Summary | |
|---|---|
protected |
WekaAbstractAttribute(String type)
Sets this attribute to the specified type. |
| Method Summary | |
|---|---|
boolean |
equals(Object o)
This equals o, if both are of the same type and
this.compareTo((W) o) returns 0. |
String |
getType()
Returns the type of the attribute. |
int |
hashCode()
Returns the hashCode of the attribute value. |
boolean |
isNominal()
Returns whether the attribute is weka nominal. |
boolean |
isNumeric()
Returns whether the attribute is weka numeric. |
boolean |
isString()
Returns whether the attribute is weka string. |
String |
toString()
Returns the value of the attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.converter.WekaAttribute |
|---|
getValue |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
private static final String[] TYPES
private static final int NOMINAL_INDEX
NOMINAL in
TYPES.
private static final int NUMERIC_INDEX
NUMERIC in
TYPES.
private static final int STRING_INDEX
STRING in
TYPES.
private final int TYPE
| Constructor Detail |
|---|
protected WekaAbstractAttribute(String type)
throws IllegalArgumentException
type - the type of this attribute - one of
NOMINAL,
NUMERIC, or
STRING. Another value of the
parameter type will result in an IllegalArgumentException.
IllegalArgumentException - if the value of type is none of
NOMINAL,
NUMERIC, or
STRING.| Method Detail |
|---|
public String getType()
WekaAttribute
getType in interface WekaAttribute<W extends WekaAbstractAttribute<W>>WekaAttribute.getType()public boolean isNominal()
WekaAttribute
isNominal in interface WekaAttribute<W extends WekaAbstractAttribute<W>>WekaAttribute.isNominal()public boolean isNumeric()
WekaAttribute
isNumeric in interface WekaAttribute<W extends WekaAbstractAttribute<W>>WekaAttribute.isNumeric()public boolean isString()
WekaAttribute
isString in interface WekaAttribute<W extends WekaAbstractAttribute<W>>WekaAttribute.isString()public String toString()
toString in class ObjectObject.toString()public boolean equals(Object o)
o, if both are of the same type and
this.compareTo((W) o) returns 0.
equals in interface WekaAttribute<W extends WekaAbstractAttribute<W>>equals in class Objecto - another object to test for equality
this.compareTo((W)o)==0.Object.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||