QArray

Methods

  • void addItem(QData qData)

  • QData removeAt(int index)

  • boolean remove(QData qData)

  • QData getItemAt(int index)

  • QData getItemByKey(String keyValue)

  • QData getItem(String matchDataName,Object matchObj)

  • QData getItem(String matchDataName,String operator,Object matchObj)

  • QArray getItems(String matchDataName,Object matchObj)

  • QArray getItems(String matchDataName,String operator,Object matchObj)

  • QStringArray findMatchingItemStr(String matchDataName,QStringArray keyArray,String targetDataName)

  • QIntegerArray findMatchingItemInt(String matchDataName,QStringArray keyArray,String targetDataName)

  • QArray filterData(String inExp)

Filter Data is used to extract data with an expression.

Some examples:

ExpressionDescription

1,4,6

Returns 1st, 4th & 6th objects

1-3,5-7,10

Returns 1,2,3,5,6,7 & 10

ItemA,ItemB

Retuns key matching, ItemA, ItemB

Note: if the item in given position or with matching key, exception will be thrown.

  • boolean hasItemWithKey(String keyValue)

  • Integer getSize()

  • boolean isEmpty()

  • String toJson()

  • String toJson(String keyName)

  • QData toQData(String keyName,String valueName)

  • void invokeDataModifiers(TFStepContext tfStepContext,TFProductElement tfProductElement)

  • boolean doAssert(TFStepContext tfStepContext,String fieldName,QArray targetList)

  • double sum(String sumDataName)

  • double sumIf(String matchDataName,Object matchObj,String sumDataName)

Last updated