CDMA client API  3.1.0
CDMA core library
org.gumtree.data.interfaces.IAttribute Interface Reference

The IAttribute interface describes a metadata of a IContainer. More...

Inherits IModelObject.

List of all members.

Public Member Functions

String getName ()
Class<?> getType ()
boolean isString ()
boolean isArray ()
int getLength ()
IArray getValue ()
String getStringValue ()
String getStringValue (int index)
Number getNumericValue ()
Number getNumericValue (int index)
boolean equals (Object o)
int hashCode ()
String toString ()
void setStringValue (String val)
void setValue (IArray value)

Detailed Description

The IAttribute interface describes a metadata of a IContainer.

CDMA attribute, with name and value. That metadata is carried by data items and groups. Those data have a name, an element type, size and can be whether an IArray or a scalar.

Author:
nxi

Member Function Documentation

Instances which have same content's values are equal.

Parameters:
oObject
Returns:
true or false

Get the number of element within the array of values.

Returns:
integer value
Note:
returns 1 if it is a scalar attribute

Get the name of this IAttribute. Attribute's names are unique within a IContainer.

Returns:
String object

Retrieve numeric value. Equivalent to getNumericValue(0)

Returns:
the first element of the value array, or null if its a String.

Retrieve a numeric value by index. If its a String, it will try to parse it as a double.

Parameters:
indexthe index into the value array.
Returns:
Number value[index], or null if its a non-parsable String or the index is out of range.

Retrieve the string value or null if the value isn't a string.

Returns:
string value
See also:
IAttribute::isString

Retrieve the string value or null if the value isn't a string.

Parameters:
indexinteger value
Returns:
string value
See also:
IAttribute::isString
IAttribute::isArray

Get the data type of the IAttribute value.

Returns:
Class object

Get the value as an IArray.

Returns:
IArray of value(s).

Override Object.hashCode() to implement equals.

Returns:
integer value

True if the value is an array (getLength() > 1).

Returns:
true or false

True if value is a string or an array of strings.

Returns:
true or false

Set the value as a String, trimming trailing zeroes.

Parameters:
valString object

Set the values from an IArray.

Parameters:
valueIArray object

String representation.

Returns:
String object

The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables