Sgss_Collection_Set_Abstract
+ Sgss_Collection_Array_Set
|
$_elements
Elements in this set |
|
$_size
The number of the elements in this set |
|
__construct ([array|object|null $elements = null])
The constructor |
boolean |
add (array|Traversable $element, array|Traversable $t)
Adds all the elements in the specified value in this set |
boolean |
clear ()
Removes all the elements in this set |
mixed |
current ()
|
boolean |
has (mixed $element)
Determines whether this set contains the specified element |
mixed |
key ()
|
mixed |
next ()
|
boolean |
remove (mixed $element)
Removes the element from this set |
void |
rewind ()
|
int |
size ()
Returns the number of elements in this set |
array |
toArray ()
Converts this set to an array |
boolean |
valid ()
|
Elements in this set
protected array $_elements
The number of the elements in this set
protected int $_size = 0
The constructor
array|object|null $elements
Value containing the elements to be stored
public __construct ([array|object|null $elements = null])
Adds all the elements in the specified value in this set
array|Traversable $t
Value containing the elements to be added
$element
public boolean add (array|Traversable $element, array|Traversable $t)
Removes all the elements in this set
public boolean clear ()
public mixed current ()
Determines whether this set contains the specified element
mixed $element
Element to determine
public boolean has (mixed $element)
public mixed key ()
public mixed next ()
Removes the element from this set
mixed $element
Element to be removed
public boolean remove (mixed $element)
public void rewind ()
Returns the number of elements in this set
public int size ()
Converts this set to an array
public array toArray ()
public boolean valid ()