ArrayList<String> al = new ArrayList<String>(ruleBlocks.keySet());
Collections.sort(al);
StringBuffer ruleBlocksStr = new StringBuffer();
for( Iterator<String> it = al.iterator(); it.hasNext(); ) {
String ruleSetName = it.next();
RuleBlock ruleBlock = getFuzzyRuleBlock(ruleSetName);
// Convert ruleSet to string (using FLC?)
ruleBlocksStr.append(ruleBlock.toStringFcl());
}
// Build the whole thing
return "FUNCTION_BLOCK " + name + "\n\n" //
+ varsIn + "\n" //