AttributeValue (Siena 2.0.4 API Documentation)
Date: 2015-05-17

siena

## Class AttributeValue

- java.lang.Object
- - siena.AttributeValue

- All Implemented Interfaces:
    java.io.Serializable, Value

      public class AttributeValue
      extends java.lang.Object
      implements java.io.Serializable, Value

  Value of an attribute in an event notification. An `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);

  See Also:
    `Notification`, `AttributeConstraint`, Serialized Form

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    Constructor and Description
    `AttributeValue()`
    `AttributeValue(AttributeValue x)`
    `AttributeValue(boolean b)`
    `AttributeValue(byte[] s)`
    `AttributeValue(double d)`
    `AttributeValue(long i)`
    `AttributeValue(java.lang.String s)`

  - ### Method Summary

    Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NULL

          public static final int NULL

      null type, the default type of a Siena attribute
      See Also:
        Constant Field Values

    - #### BYTEARRAY

          public static final int BYTEARRAY

      string of bytes
      See Also:
        Constant Field Values

    - #### STRING

          public static final int STRING

      string of bytes an alias to `BYTEARRAY` provided only for backward compatibility
      See Also:
        Constant Field Values

    - #### LONG

          public static final int LONG

      integer type. corresponds to the Java `long` type.
      See Also:
        Constant Field Values

    - #### INT

          public static final int INT

      integer type. corresponds to the Java `int` type.
      See Also:
        Constant Field Values

    - #### DOUBLE

          public static final int DOUBLE

      double type. corresponds to the Java `double` type.
      See Also:
        Constant Field Values

    - #### BOOL

          public static final int BOOL

      boolean type. corresponds to the Java `boolean` type.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AttributeValue

          public AttributeValue()

    - #### AttributeValue

          public AttributeValue(AttributeValue x)

    - #### AttributeValue

          public AttributeValue(java.lang.String s)

    - #### AttributeValue

          public AttributeValue(byte[] s)

    - #### AttributeValue

          public AttributeValue(long i)

    - #### AttributeValue

          public AttributeValue(boolean b)

    - #### AttributeValue

          public AttributeValue(double d)

  - ### Method Detail

    - #### getType

          public int getType()

      Specified by:
        `getType` in interface `Value`

    - #### intValue

          public int intValue()

      Specified by:
        `intValue` in interface `Value`

    - #### longValue

          public long longValue()

      Specified by:
        `longValue` in interface `Value`

    - #### doubleValue

          public double doubleValue()

      Specified by:
        `doubleValue` in interface `Value`

    - #### booleanValue

          public boolean booleanValue()

      Specified by:
        `booleanValue` in interface `Value`

    - #### stringValue

          public java.lang.String stringValue()

      Specified by:
        `stringValue` in interface `Value`

    - #### byteArrayValue

          public byte[] byteArrayValue()

      Specified by:
        `byteArrayValue` in interface `Value`

    - #### isEqualTo

          public boolean isEqualTo(AttributeValue x)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2011 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga