Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace com.ibm.daell ;
- composite CollectionTypes
- {
- type
- MyData_t = int32 x, list<rstring> names, set<rstring> friends,
- map<rstring,float64> jobInfo;
- graph
- (stream<boolean signal> Signal) = Beacon()
- {
- param
- iterations: 1;
- }
- () as MySink1 = Custom(Signal)
- {
- logic
- onTuple Signal :{
- //Tuple set , map are initialized using {}
- mutable MyData_t md1 ={}; //Initialize tuple
- md1.x=55;
- //Populating a list
- appendM(md1.names,"Rudra");
- appendM(md1.names,"Fred");
- appendM(md1.names,"Prabh");
- appendM(md1.names,"Soren");
- appendM(md1.names,"Hemanth");
- removeM(md1.names,3);
- //clearM(md1.names);
- printStringLn("md1.names="+(rstring)md1.names);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement