includes(value: MemberType): Boolean;
The includes method of the Set class returns true if the object specified in the value parameter is contained in the set; for example:
isEmployee(emp: Employee): Boolean; // returns true if an emp is below self in the organization hierarchy vars child : Employee; bool : Boolean; begin if myEmployees.size <> 0 then if myEmployees.includes(emp) then bool := true; else foreach child in myEmployees do if child.isEmployee(emp) = true then bool := true; break; endif; endforeach; endif; endif; bool := false; return bool; end; if not goodCustomers.includes(cust) then goodCustomers.add(cust); endif;