Some const correctness in the Java pseudo core.

This commit is contained in:
2025-08-21 17:17:43 -04:00
parent 455169074a
commit b934b115ed
11 changed files with 35 additions and 23 deletions

View File

@ -85,11 +85,12 @@ Iterator::~Iterator()
// Collection
// ----------------
void Collection::intoStringBuffer(misc::StringBuffer *sb)
void
Collection::intoStringBuffer( misc::StringBuffer *sb ) const
{
sb->append("{ ");
bool first = true;
for (Iterator it = iterator(); it.hasNext(); ) {
for (Iterator it = const_cast< Collection * >( this )->iterator(); it.hasNext(); ) {
if (!first)
sb->append(", ");
it.getNext()->intoStringBuffer(sb);