PHP Interface Pinq\Iterators\ISet

Author: Elliot Levin ([email protected])
Inheritance: extends Countable, extends Traversable
Show file Open project: timetoogo/pinq Interface Usage Examples

Public Methods

Method Description
add ( mixed $value ) : boolean Attempts to add the value to the set, will fail if the value is already contained in the set.
addRef ( mixed &$value ) : boolean Attempts to add the value by reference to the set, will fail if the value is already contained in the set.
clear ( ) : void Removes all values from the set.
contains ( mixed $value ) : boolean Returns whether the values in contained in the set.
remove ( mixed $value ) : boolean Attempts to remove the value from the set, will fail if the value is not contained in the set.

Method Details

add() public method

Attempts to add the value to the set, will fail if the value is already contained in the set.
public add ( mixed $value ) : boolean
$value mixed
return boolean Whether the value was successfully added

addRef() public method

Attempts to add the value by reference to the set, will fail if the value is already contained in the set.
public addRef ( mixed &$value ) : boolean
$value mixed
return boolean Whether the value was successfully added

clear() public method

Removes all values from the set.
public clear ( ) : void
return void

contains() public method

Returns whether the values in contained in the set.
public contains ( mixed $value ) : boolean
$value mixed
return boolean

remove() public method

Attempts to remove the value from the set, will fail if the value is not contained in the set.
public remove ( mixed $value ) : boolean
$value mixed
return boolean Whether the value was successfully removed