Set.remove Method

Removes an element from the set.

Syntax

public boolean remove(anytype arg)

Run On

Called

Parameters

  • arg
    Type: anytype
    The element to remove.

Return Value

Type: boolean
true if the element was found and removed; otherwise, false.

Examples

The following example checks whether any of the values in one set, the noConfigs set, are found in a second set, the yesConfigs set. If they are found, they are removed from the yesConfigs set.

Set             noConfigs; 
Set             yesConfigs; 
ConfigId        configId; 
SetEnumerator   se; 
; 
  
se = noConfigs.getEnumerator(); 
while (se.moveNext()) 
{ 
    configId    = se.current(); 
    if (yesConfigs.in(configId)) 
    { 
        yesConfigs.remove(configId); 
    } 
}

See Also

Set Class

Set.in Method

Set.add Method