Transforming the content of a collection to a String
You can print the content of collection domains or arrays to a string.
To transform the content of a collection to a String, you can use collection domains or arrays.
-
In the BOM you declare two static methods with the same name:
Collection domains:
public static string toString(java.util.Collection arg domain 0,* class object) property noTypeConversion "true";Arrays:
public static string toString(java.lang.Object[] arg);Only one of the two methods is verbalized in the vocabulary, to make sure you have only one sentence in the BAL. During translation to ILOG® Rule Language (IRL), the method overriding mechanism selects the most appropriate method, based on the argument type. Because of the noTypeConversion property, the IRL translator does not try to adapt the argument type of the verbalized method.
If you have a ruleset parameter of type java.util.Collection named
myCollectionand another one of type Item[] namedmyArray, you can use the BOM methods as follows:then print to string myCollection ; print to string myArray ;