|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.infoengine.connector.Data
com.infoengine.connector.Attribute
public class Attribute
represents Info*Engine attribute data
Attributes have names and can contain one or more Objects as values.
Attributes are contained within Elements.
The concept of State here is simply a place holder for Info*Engine attribute
state information. If state for an attribute value is non-null then the state
value should be the external form of a State object.
If this group was generated as the result of deserializing Info*Engine XML and
the state for an attribute value is non-null then the state value will
be the external form of a State object.
Group,
Element,
Serialized Form| Constructor Summary | |
|---|---|
Attribute()
create a new unnamed attribute |
|
Attribute(java.lang.String name)
create a new named attribute |
|
Attribute(java.lang.String name,
java.lang.Object value)
create a new named attrbute with a value |
|
| Method Summary | |
|---|---|
void |
addValue(java.lang.Object value)
add a value to this attribute. |
void |
addValue(java.lang.Object value,
java.lang.String state)
add a value with a state to this attribute |
boolean |
equals(java.lang.Object other)
test this attribute against another for equality |
java.lang.String |
getName()
get this attribute's name |
int |
getSize()
return the number of values this attribute has |
java.lang.String |
getState()
retrieve the state of the first attribute value |
java.lang.String |
getStateAt(int index)
retrieve the state of a specific attribute by index |
java.lang.Object |
getValue()
get the value of this attribute. |
java.lang.Object |
getValueAt(int index)
get an attribute value by index |
java.util.Enumeration |
getValues()
get an Enumeration of this attributes values. |
int |
hashCode()
generate this attribute's hashCode the value is based on attribute name, all its values and metadata. |
void |
setState(java.lang.String state)
set the state of the first attribute value |
void |
setStateAt(java.lang.String state,
int index)
set the state of an attribute value by index. |
void |
setValue(java.lang.Object value)
set this attributes value. |
void |
setValueAt(java.lang.Object value,
int index)
set an attribute value by index. |
java.lang.String |
toString()
return a String representation of this Attribute (resembles XML useful for debugging only) |
| Methods inherited from class com.infoengine.connector.Data |
|---|
addMetaValue, getMetaNames, getMetaValue, getMetaValues, removeMetaValues, setMetaValue |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute()
public Attribute(java.lang.String name)
name - attribute name
public Attribute(java.lang.String name,
java.lang.Object value)
name - attribute namevalue - attribute value| Method Detail |
|---|
public void setValue(java.lang.Object value)
value - the new valuepublic void addValue(java.lang.Object value)
value - a new value to add
public void addValue(java.lang.Object value,
java.lang.String state)
value - a new value to addstate - the state of that valuepublic java.lang.Object getValue()
public java.util.Enumeration getValues()
public int getSize()
public java.lang.Object getValueAt(int index)
index - the index of the value to retrieve
public void setValueAt(java.lang.Object value,
int index)
value - the value to setindex - the index to replacepublic java.lang.String getName()
public java.lang.String getState()
public java.lang.String getStateAt(int index)
public void setState(java.lang.String state)
state - the new attribute state
public void setStateAt(java.lang.String state,
int index)
state - the new attribute stateindex - the attribute indexpublic boolean equals(java.lang.Object other)
equals in class Datapublic int hashCode()
hashCode in class Datapublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||