Sgss_Collection_Set_Abstract 
Abstract class for collection without duplicated element

Description

Implements:
Sgss_Collection_Set_Interface
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Collection/Set/Abstract.php (line 51)

Direct descendant

Sgss_Collection_Array_Set Represents a collection array without duplicated element

Class overview

Methods

boolean addAll (array|object $t)

Adds all the elements in the specified object in this set

int count ()
boolean hasAll (array|object $t)

Determines whether this set contains all the elements in the specified object

boolean isEmpty ()

Determines whether this set contains no element

boolean removeAll (array|object $t)

Removes all the elements in the specified object from this set

Method detail

addAll

Adds all the elements in the specified object in this set

Parameters:
  • array|object $t

    Object containing the elements to be added

Returns:
boolean -- True when the operation changed this set
Throws:
  • Sgss_Collection_Set_Exception

    When the specified value is untraversable

Specified by:
Uses:
Sgss_Collection_Set_Interface::add()
Used by:
Sgss_Collection_Array_Set::__construct()
Related subject:
Sgss_Collection_Set_Interface::addAll()
Signature:
public boolean addAll (array|object $t)


count

Uses:
Sgss_Collection_Set_Interface::size()
Related subject:
Countable::count()
Signature:
public int count ()


hasAll

Determines whether this set contains all the elements in the specified object

Parameters:
  • array|object $t

    Object containing the elements to determine

Returns:
boolean -- True when this set contains the all the element in the object
Throws:
  • Sgss_Collection_Set_Exception

    When the specified value is untraversable

Specified by:
Uses:
Sgss_Collection_Set_Interface::has()
Related subject:
Sgss_Collection_Set_Interface::hasAll()
Signature:
public boolean hasAll (array|object $t)


isEmpty

Determines whether this set contains no element

Returns:
boolean -- True when this set contains no element
Specified by:
Uses:
Sgss_Collection_Set_Interface::size()
Related subject:
Sgss_Collection_Set_Interface::isEmpty()
Signature:
public boolean isEmpty ()


removeAll

Removes all the elements in the specified object from this set

Parameters:
  • array|object $t

    Object containing the elements to be removed

Returns:
boolean -- True when the operation changed this set
Throws:
  • Sgss_Collection_Set_Exception

    When the specified value is untraversable

Specified by:
Uses:
Sgss_Collection_Set_Interface::remove()
Related subject:
Sgss_Collection_Set_Interface::removeAll()
Signature:
public boolean removeAll (array|object $t)