|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcosc575.p1.Attribute
public class Attribute
Stores attribute information for data sets for machine learning. An attribute has a name.
Field Summary | |
---|---|
protected java.lang.String |
name
this attribute's name |
Constructor Summary | |
---|---|
Attribute()
Default constructor. |
|
Attribute(java.util.Scanner s)
Explicit constructor. |
|
Attribute(java.lang.String name)
Explicit constructor. |
Method Summary | |
---|---|
java.lang.String |
getName()
Gets the name of this attribute. |
int |
getSize()
Gets the size of this attribute's domain. |
static void |
main(java.lang.String[] args)
|
private boolean |
parse(java.util.Scanner scanner)
Extracts an attribute from the specified scanner |
void |
setName(java.lang.String name)
Sets the name of this attribute to the specified name. |
java.lang.String |
toString()
Returns a string representation of this attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
Constructor Detail |
---|
public Attribute()
public Attribute(java.lang.String name) throws java.lang.Exception
name
- the name of this attribute
java.lang.Exception
public Attribute(java.util.Scanner s) throws java.lang.Exception
s
- the scanner containing an attribute.
java.lang.Exception
Method Detail |
---|
public java.lang.String getName() throws java.lang.Exception
java.lang.Exception
public int getSize() throws java.lang.Exception
java.lang.Exception
private boolean parse(java.util.Scanner scanner) throws java.lang.Exception
java.lang.Exception
public void setName(java.lang.String name)
name
- the name of this attributepublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |