public class AttributeValue extends java.lang.Object implements java.io.Serializable, Value
AttributeValue is a container for a typed vaule of
an attribute in a notification. An AttributeValue can
be of type String, byte[],
int, long, double, and
boolean. Example:
AttributeValue v = new
AttributeValue("Antonio");
System.out.println(v.stringValue());
Notification e = new Notification();
e.putAttribute("name", v);
Notification,
AttributeConstraint,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
BOOL
boolean type.
|
static int |
BYTEARRAY
string of bytes
|
static int |
DOUBLE
double type.
|
static int |
INT
integer type.
|
static int |
LONG
integer type.
|
static int |
NULL
null type, the default type of a Siena attribute
|
static int |
STRING
string of bytes
an alias to
BYTEARRAY
provided only for backward compatibility |
| Constructor and Description |
|---|
AttributeValue() |
AttributeValue(AttributeValue x) |
AttributeValue(boolean b) |
AttributeValue(byte[] s) |
AttributeValue(double d) |
AttributeValue(long i) |
AttributeValue(java.lang.String s) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue() |
byte[] |
byteArrayValue() |
double |
doubleValue() |
int |
getType() |
int |
hashCode() |
int |
intValue() |
boolean |
isEqualTo(AttributeValue x) |
long |
longValue() |
java.lang.String |
stringValue() |
java.lang.String |
toString() |
public static final int NULL
public static final int BYTEARRAY
public static final int STRING
BYTEARRAY
provided only for backward compatibilitypublic static final int LONG
long type.public static final int INT
int type.public static final int DOUBLE
double type.public static final int BOOL
boolean type.public AttributeValue()
public AttributeValue(AttributeValue x)
public AttributeValue(java.lang.String s)
public AttributeValue(byte[] s)
public AttributeValue(long i)
public AttributeValue(boolean b)
public AttributeValue(double d)
public double doubleValue()
doubleValue in interface Valuepublic boolean booleanValue()
booleanValue in interface Valuepublic java.lang.String stringValue()
stringValue in interface Valuepublic byte[] byteArrayValue()
byteArrayValue in interface Valuepublic boolean isEqualTo(AttributeValue x)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
Copyright © 2005-2011 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga