Skip to Content
avatar image
Former Member

Java Function result.addValue(newValue)?

Hi All,

Could you tell me what this function does?

result.addValue(newValue);

Regards,

XIer

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 29, 2007 at 11:35 PM

    Xier,

    It will add the value to the result list.

    raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2007 at 11:35 PM

    HI,

    result.addvalue will add value to your output array. If you look at your function one of the paramete is result..which is nothing but your output Array.

    So after processing data you can add data to output using result.addValue("New value")

    Hope this wull help.

    Let us know if you need more details.

    Nilesh

    Add comment
    10|10000 characters needed characters exceeded

    • Xier,

      Consider the below example

      My input xml looks like

      <Record>

      <row>

      <Value>1</Value>

      </row>

      <row>

      <Value>1</Value>

      </row>

      <row>

      <Value>1</Value>

      </row>

      <row>

      <Value>3</Value>

      </row>

      <row>

      <Value>5</Value>

      </row>

      <row>

      <Value>44</Value>

      </row>

      <row>

      <Value>55</Value>

      </row>

      <row>

      <Value>66</Value>

      </row>

      Then if you want to take all the values of element <Value> ,then

      u must write,

      for (int j =0;j<input.length;j++)

      {

      <b>result.addValue(input[j]) ;</b>

      }

      So the above UDF will add all the Value element into single queue as below picture.

      http://flickr.com/photo_zoom.gne?id=798590221&size=o

      If it's not clear, reply back.

      raj.

  • avatar image
    Former Member
    Oct 30, 2007 at 04:15 AM

    Hi

    the java function result.addValue()

    if you use the function as result.addValue("");

    then this will generate a balnk node.

    n if you use the function as result.addValue("A");

    then it will give the output as A.

    Thanks

    Rinku

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 30, 2007 at 08:43 AM

    addValue(new Value) is one of methods of class ResultList.

    ResultList supports the methods and constants

    - void addValue(String)

    - void addContextChange() *

    - void addSuppress() *

    - void clear()

    - ResultList.CC (context change) *

    - ResultList.SUPPRESS (suppressed value) *

    addValue is the method used in advanced function to build the queue in output of the function.

    I remember that only with queue functions you can use "*" methods

    Add comment
    10|10000 characters needed characters exceeded