Set(LegacyRegister[] regs) {
            registerSet = new HashSet(2 * regs.length);
            for (int cntr = 0; cntr < regs.length; cntr++) {
                registerSet.add(regs[cntr]);
            }

            StringBuffer buf = new StringBuffer("{");
            for (int cntr = 0; cntr < regs.length; cntr++) {
                registerSet.add(regs[cntr]);
                // abreviate large sets
                if (cntr == 2 && regs.length > 4) buf.append("..., ");
                // print first two, and last, or all if the set is fewer than five
                if (cntr < 2 || cntr == regs.length - 1 || regs.length < 5) {
                    buf.append(regs[cntr]);
                    if (cntr < regs.length - 1) buf.append(", ");
                }
            }
            buf.append('}');
            contents = buf.toString();
        }