BoxSetClear
Remove all elements from a Set, leaving it empty.
The Set is modified in place and returned to support method chaining.
Method Signature
BoxSetClear(set=[modifiableSet])Arguments
Argument
Type
Required
Description
Default
set
modifiableSet
true
The set to clear.
Examples
Remove all elements from a Set
After calling clear() the Set is empty but still usable.
s = [ 1, 2, 3 ].toSet();
before = s.isEmpty();
s.clear();
after = s.isEmpty();
writeOutput( before & "," & after );
Result: false,true
Related
Last updated
Was this helpful?
