forked from jasder/antlr
Add override BitSet.ToString
This commit is contained in:
parent
fdb73a92b8
commit
7d7f5a1afc
|
@ -280,5 +280,22 @@ namespace Sharpen
|
|||
|
||||
return result.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append('{');
|
||||
|
||||
for (int i = NextSetBit(0); i >= 0; i = NextSetBit(i + 1))
|
||||
{
|
||||
if (builder.Length > 1)
|
||||
builder.Append(", ");
|
||||
|
||||
builder.Append(i);
|
||||
}
|
||||
|
||||
builder.Append('}');
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue