PHP Class Cassandra\Set

Inheritance: implements Countable, implements Iterator
ファイルを表示 Open project: datastax/php-driver

Public Methods

Method Description
__construct ( cassandra\Type $type ) Creates a new collection of a given type.
add ( mixed $value ) : boolean Adds a value to this set.
count ( ) : integer Total number of elements in this set
current ( ) : mixed Current element for iteration
has ( mixed $value ) : boolean Returns whether a value is in this set.
key ( ) : integer Current key for iteration
next ( ) : void Move internal iterator forward
remove ( mixed $value ) : boolean Removes a value to this set.
rewind ( ) : void Rewind internal iterator
type ( ) : cassandra\Type The type of this set.
valid ( ) : boolean Check whether a current value exists
values ( ) : array Array of values in this set.

Method Details

__construct() public method

Creates a new collection of a given type.
public __construct ( cassandra\Type $type )
$type cassandra\Type

add() public method

Adds a value to this set.
public add ( mixed $value ) : boolean
$value mixed Value
return boolean whether the value has been added

count() public method

Total number of elements in this set
public count ( ) : integer
return integer count

current() public method

Current element for iteration
public current ( ) : mixed
return mixed current element

has() public method

Returns whether a value is in this set.
public has ( mixed $value ) : boolean
$value mixed Value
return boolean whether the value is in the set

key() public method

Current key for iteration
public key ( ) : integer
return integer current key

next() public method

Move internal iterator forward
public next ( ) : void
return void

remove() public method

Removes a value to this set.
public remove ( mixed $value ) : boolean
$value mixed Value
return boolean whether the value has been removed

rewind() public method

Rewind internal iterator
public rewind ( ) : void
return void

type() public method

The type of this set.
public type ( ) : cassandra\Type
return cassandra\Type

valid() public method

Check whether a current value exists
public valid ( ) : boolean
return boolean

values() public method

Array of values in this set.
public values ( ) : array
return array values