7.10 StreamTuple class (common API)

Class hierarchy

java.lang.Object
 |-jp.co.Hitachi.soft.sdp.common.data.StreamTuple

Explanation

The StreamTuple class is used to express tuples.

Constructor

The following table shows the StreamTuple class constructor list.

Constructor nameFunction
StreamTuple(Object[] dataArray)Generates a new StreamTuple class instance (StreamTuple type object) in the data object array specified in the parameter.

Method

The following table shows the StreamTuple class method list.

Return valueMethod nameFunction
booleanequals(Object obj)Determines whether the data object array and times of the StreamTuple type object specified in the parameter match those in the data object array of the tuple's StreamTuple type object.
Object[]getDataArray()Acquires the data object array of the StreamTuple type object.
StreamTimegetSystemTime()Acquires the system time.
inthashCode()Acquires a hash code.
java.lang.StringtoString()Acquires the tuple information from the StreamTuple type object and returns it as a character string.

Notes

The tuple's time is automatically set to the system time when a tuple arrives at the SDP server (StreamTime type object). If a tuple is generated by a custom adaptor, the initial value of the time object is set to null.

Usage example

In the example shown below, data in a Java data type is used to generate a StreamTuple type object.

In this example, the generated tuples have elements that are Integer type data and String type data.

 Object[] data = new Object[] {
     new Integer (1),
     new String ("AAA")
 };
 tuple = new StreamTuple(data);

Organization of this section
StreamTuple(Object[] dataArray) constructor
equals(Object obj) method
getDataArray() method
getSystemTime() method
hashCode() method
toString() method