HH\ImmSet

The HH\ImmSet<Tv> class

HHVM provides a native implementation for this class. The PHP class definition below is not actually used at run time; it is simply provided for the typechecker and for developer reference.

An ImmSet cannot be mutated. No elements can be added or removed from it, nor can elements be overwritten using assignment (i.e. $s[$k] = $v is not allowed).

Construct it with a Traversable:

$a = array(1, 2);
$s = new ImmSet($a);

or use the literal syntax:

$s = ImmSet {1, 2};

Interface synopsis

class ImmSet implements ConstSet {...}