net.sf.myra.datamining.data
Class Attribute

java.lang.Object
  extended by net.sf.myra.datamining.data.Attribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Attribute>
Direct Known Subclasses:
ArffHelper.UnsupportedAttribute, ContinuousAttribute, NominalAttribute

public abstract class Attribute
extends java.lang.Object
implements java.lang.Comparable<Attribute>, java.lang.Cloneable, java.io.Serializable

This class represents an attribute of the dataset.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero
See Also:
Metadata, Serialized Form

Constructor Summary
Attribute(java.lang.String name)
          Creates a new Attribute instance.
 
Method Summary
 Attribute clone()
           
 int compareTo(Attribute o)
           
 boolean equals(Attribute o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the attribute's name.
 int hashCode()
           
abstract  boolean isMissing(double value)
          Checks if the specified value corresponds to a missing value.
 boolean isTarget()
          Indicates if this attribute is the target attribute.
 void setName(java.lang.String name)
          Sets the attribute's name.
abstract  void validate(java.lang.String value)
          Checks of the current value belongs to the attribute's domain.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.lang.String name)
Creates a new Attribute instance.

Parameters:
name - the attribute's name.
Method Detail

getName

public java.lang.String getName()
Returns the attribute's name.

Returns:
the attribute's name.

setName

public void setName(java.lang.String name)
Sets the attribute's name.

Parameters:
name - the name to set.

isTarget

public boolean isTarget()
Indicates if this attribute is the target attribute.

Returns:
true if this attribute is the target attribute; false otherwise.

validate

public abstract void validate(java.lang.String value)
Checks of the current value belongs to the attribute's domain.

Parameters:
value - to value to check.

isMissing

public abstract boolean isMissing(double value)
Checks if the specified value corresponds to a missing value.

Parameters:
value - the value to check.
Returns:
true if the specified value corresponds to a missing value; false otherwise.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Attribute o)

compareTo

public int compareTo(Attribute o)
Specified by:
compareTo in interface java.lang.Comparable<Attribute>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

public Attribute clone()
Overrides:
clone in class java.lang.Object


Copyright © 2013. All Rights Reserved.