TypeDescriptor type;
boolean partition;
Vector subsets;
+ public static String prefix="";
public SetDescriptor(String name) {
super(name);
public static Set expand(Set descriptors) {
HashSet expanded = new HashSet();
Iterator d = descriptors.iterator();
-
+
while (d.hasNext()) {
Descriptor descriptor = (Descriptor) d.next();
if (descriptor instanceof SetDescriptor) {
expanded.addAll(((SetDescriptor) descriptor).allSubsets());
- }
+ } else
+ expanded.add(descriptor); /* Still need the descriptor */
}
expanded.addAll(descriptors);
- return expanded;
+ return expanded;
}
public boolean isPartition() {
return v;
}
+ public String getSafeSymbol() {
+ return prefix+safename;
+ }
+ public String getJustSafeSymbol() {
+ return safename;
+ }
}