|
|
com.architech.entry
|
Field Summary | |
static char |
ATTRIBUTE_ADD
Add value |
static char |
ATTRIBUTE_DELETE
Delete value |
static char |
ATTRIBUTE_REPLACE
Replace value |
Constructor Summary | |
Attribute()
Initialize this attribute with no name, no values and the operation code set to ATTRIBUTE_REPLACE. |
|
Attribute(String name)
Initializes this attribute with no values and the operation code set to ATTRIBUTE_REPLACE, the name is set to name. |
|
Attribute(String name,
Object value)
Initializes this attribute with operation code set to ATTRIBUTE_REPLACE, the name is set to name and the value value is added to the list of values. |
Method Summary | |
void |
addValue(Object p1)
This method adds a value to the attribute's list of values. |
void |
clear()
This method removes all values from this attribute and sets the operation to ATTRIBUTE_REPLACE. |
Object |
clone()
Returns a clone of this object. |
boolean |
contains(Object p1)
This method checks if a value is contained in this attribute. |
String |
getName()
This method returns this attributes's name. |
char |
getOper()
This method returns the operation type of this attribute. |
String |
getValue()
This method returns the first value, if any, as a String object. |
Object |
getValue(int index)
This method returns the value at the position given by index. |
Object[] |
getValues()
This method returns this attribute's values as an array of objects. |
boolean |
hasValue(Object value)
This method checks if a value is contained in this attribute. |
boolean |
hasValueIC(String value)
This method checks if a string value is contained in this attribute. |
void |
setName(String name)
This method sets this attributes's name. |
void |
setOper(char operation)
This method sets the operation type of this attribute. |
void |
setValue(int p1,
Object p2)
This method sets the attribute's value at a specific position to the value specified. |
void |
setValue(Object p1)
This method sets the attribute's value at position 0 to the value specified. |
void |
setValues(Vector values)
This method sets the attribute's values using the Vector passed to it. |
int |
size()
This method returns the number of values contained in this attribute. |
String |
toString()
This method returns the string representation of this attribute. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final char ATTRIBUTE_REPLACE
public static final char ATTRIBUTE_ADD
public static final char ATTRIBUTE_DELETE
Constructor Detail |
public Attribute()
public Attribute(String name)
name
- The attribute namepublic Attribute(String name, Object value)
name
- The attribute namevalue
- The attribute valueMethod Detail |
public Object clone()
public void clear()
public boolean hasValue(Object value)
value
- The value to check forpublic boolean hasValueIC(String value)
JavaScript example:
if ( conn.hasValueIC("this value") ) { task.logmsg ( "It is there" ); }
value
- The string value to check forpublic boolean contains(Object p1)
contains
in interface com.architech.entry.AttributeInterface
value
- The value to check forpublic String getValue()
getValue
in interface com.architech.entry.AttributeInterface
public Object getValue(int index)
JavaScript example
var v = conn.getAttribute("attrname").getValue ( 0 ); task.logmsg ( "Java class of v is: " + v.getClass().getName() ); task.logmsg ( "String representation: " + v.toString() ); if ( v.getClass().getName() == "java.util.Date" ) { task.logmsg ("Date object: " + v.getMonth(); }
getValue
in interface com.architech.entry.AttributeInterface
index
- The positionsize()
public Object[] getValues()
getValues
in interface com.architech.entry.AttributeInterface
public void setValues(Vector values)
p1
- The new value arraypublic void setValue(Object p1)
setValue
in interface com.architech.entry.AttributeInterface
p1
- The new valuepublic void setValue(int p1, Object p2)
setValue
in interface com.architech.entry.AttributeInterface
p1
- The positionp2
- The valueIndex
- out of boundspublic void addValue(Object p1)
addValue
in interface com.architech.entry.AttributeInterface
p1
- The new valuepublic String getName()
getName
in interface com.architech.entry.AttributeInterface
public void setName(String name)
setName
in interface com.architech.entry.AttributeInterface
name
- The attribute's namepublic char getOper()
public void setOper(char operation)
operation
- The operation type as a charpublic int size()
size
in interface com.architech.entry.AttributeInterface
public String toString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
|