|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaapo.project.Attribute
public class Attribute
Attribute of a project component, with name, type and value.
Attribute value is stored and returned as a generic Object instance. It may be cast into a specific class according to the following rules:
| Nested Class Summary | |
|---|---|
static class |
Attribute.AttributeType
Enumeration for attribute type. |
| Field Summary | |
|---|---|
protected String |
name
|
protected Attribute.AttributeType |
type
|
protected Object |
value
|
| Constructor Summary | |
|---|---|
Attribute(String name,
Attribute.AttributeType type)
Constructs an attribute with null initial value. |
|
Attribute(String name,
Attribute.AttributeType type,
Object value)
Constructs an attribute with given initial value. |
|
| Method Summary | |
|---|---|
String |
getName()
Returns attribute name. |
Attribute.AttributeType |
getType()
Returns attribute type. |
Object |
getValue()
Returns attribute value. |
void |
setValue(Object value)
Sets attribute value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected Object value
protected Attribute.AttributeType type
| Constructor Detail |
|---|
public Attribute(String name,
Attribute.AttributeType type)
name - Attribute nametype - Attribute typeProjectComponent.addAttribute(String, Attribute.AttributeType)
public Attribute(String name,
Attribute.AttributeType type,
Object value)
name - Attribute nametype - Attribute typevalue - Initial value
IllegalArgumentException - If the value object is wrong typeProjectComponent.addAttribute(String, Attribute.AttributeType, Object)| Method Detail |
|---|
public void setValue(Object value)
value - New value.
IllegalArgumentException - If the value object is wrong typepublic Object getValue()
public String getName()
public Attribute.AttributeType getType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||