Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | - |
Not Applicable | - |
Resolution:
Description:
==========
What object types are to be declared for Collections.List.createArrayList() and for similar functions for Set, Iterator, Map, etc.?
How to create a SortedSet?
Environment:
==========
TIBCO BusinessEvents 5.1.1
Resolution:
=========
Types to be declared for Collections.List.createArrayList() and for similar functions for Set, Iterator, Map, etc, is Object.
To create a SortedSet, declare an Object and use Collections.Set.createTreeSet() to create a sorted set. Then work on the set Object using Collections.Set.* and Collections.SortedSet.* API functions.
For example:
Object sset = Collections.Set.createTreeSet();
for(int i=0; i<pbpart.PricebookBreaks@length;i=i+1){
Collections.add(sset, pbpart.PricebookBreaks[i].quantity);
}
Attachement:
===========
Attached a simple project that shows the usage of Collections.List.*(), Collections.iterator.*(), Collections.Map.*(), Collections.Set.*().