|
|||||||||||
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
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 FormNested Class Summary | |
(package private) class |
Attribute.AttributeValueHolder
|
Field Summary | |
private Vector |
_values
|
private String |
name
|
Fields inherited from class com.infoengine.connector.Data |
_meta |
Constructor Summary | |
Attribute()
create a new unnamed attribute |
|
Attribute(String name)
create a new named attribute |
|
Attribute(String name,
Object value)
create a new named attrbute with a value |
Method Summary | |
void |
addValue(Object value)
add a value to this attribute. |
void |
addValue(Object value,
String state)
add a value with a state to this attribute |
boolean |
equals(Object other)
test this attribute against another for equality |
String |
getName()
get this attribute's name |
int |
getSize()
return the number of values this attribute has |
String |
getState()
retrieve the state of the first attribute value |
String |
getStateAt(int index)
retrieve the state of a specific attribute by index |
Object |
getValue()
get the value of this attribute. |
Object |
getValueAt(int index)
get an attribute value by index |
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(String state)
set the state of the first attribute value |
void |
setStateAt(String state,
int index)
set the state of an attribute value by index. |
void |
setValue(Object value)
set this attributes value. |
void |
setValueAt(Object value,
int index)
set an attribute value by index. |
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 |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private String name
private Vector _values
Constructor Detail |
public Attribute()
public Attribute(String name)
name
- attribute namepublic Attribute(String name, Object value)
name
- attribute namevalue
- attribute valueMethod Detail |
public void setValue(Object value)
value
- the new valuepublic void addValue(Object value)
value
- a new value to addpublic void addValue(Object value, String state)
value
- a new value to addstate
- the state of that valuepublic Object getValue()
public Enumeration getValues()
public int getSize()
public Object getValueAt(int index)
index
- the index of the value to retrieve
public void setValueAt(Object value, int index)
value
- the value to setindex
- the index to replacepublic String getName()
public String getState()
public String getStateAt(int index)
public void setState(String state)
state
- the new attribute statepublic void setStateAt(String state, int index)
state
- the new attribute stateindex
- the attribute indexpublic boolean equals(Object other)
equals
in class Data
public int hashCode()
hashCode
in class Data
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |