Class Xyster_Collection

Description

Implementation of Xyster_Collection_Abstract with static helper methods

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Collection.php (line 28)

Xyster_Collection_Abstract
   |
   --Xyster_Collection
Direct descendents
Class Description
Xyster_Collection_Set Simple implementation of the no-duplicate collection
Method Summary
static Xyster_Container_List_Interface emptyList ()
static Xyster_Collection_Interface using ( $values, [boolean $immutable = false])
Xyster_Collection __construct ([Xyster_Collection_Interface $collection = null], [boolean $immutable = false])
boolean add (mixed $item)
void clear ()
boolean remove (mixed $item)
Variables
Methods
static method emptyList (line 119)

Gets an immutable, empty list

  • access: public
static Xyster_Container_List_Interface emptyList ()
static method fixedCollection (line 134)

Returns a new unchangable collection containing all the supplied values

  • access: public
static Xyster_Collection_Interface fixedCollection (Xyster_Collection_Interface $collection)
static method fixedList (line 145)

Returns a new unchangable list containing all the supplied values

  • access: public
static method fixedMap (line 157)

Returns a new unchangable map containing all the supplied key/value pairs

  • access: public
static method fixedSet (line 169)

Returns a new unchangable set containing all the supplied values

  • access: public
static method using (line 182)

Creates a new collection containing the values

  • access: public
static Xyster_Collection_Interface using ( $values, [boolean $immutable = false])
  • array $values
  • boolean $immutable
Constructor __construct (line 43)

Creates a new simple collection

  • access: public
Xyster_Collection __construct ([Xyster_Collection_Interface $collection = null], [boolean $immutable = false])

Redefined in descendants as:
add (line 58)

Adds an item to the collection

  • return: Whether the collection changed as a result of this method
  • throws: Xyster_Collection_Exception if the collection cannot be modified
  • access: public
boolean add (mixed $item)
  • mixed $item: The item to add

Redefinition of:
Xyster_Collection_Abstract::add()
Adds an item to the collection

Redefined in descendants as:
clear (line 69)

Removes all items from the collection

  • throws: Xyster_Collection_Exception if the collection cannot be modified
  • access: public
void clear ()

Redefinition of:
Xyster_Collection_Abstract::clear()
Removes all items from the collection
remove (line 82)

Removes the specified value from the collection

  • return: If the value was in the collection
  • throws: Xyster_Collection_Exception if the collection cannot be modified
  • access: public
boolean remove (mixed $item)
  • mixed $item: The value to remove

Redefinition of:
Xyster_Collection_Abstract::remove()
Removes the specified value from the collection
removeAll (line 95)

Removes all of the specified values from the collection

  • return: Whether the collection changed as a result of this method
  • throws: Xyster_Collection_Exception if the collection cannot be modified
  • access: public
boolean removeAll (Xyster_Collection_Interface $values)

Redefinition of:
Xyster_Collection_Abstract::removeAll()
Removes all of the specified values from the collection
retainAll (line 108)

Removes all values from the collection except for the ones specified

  • return: Whether the collection changed as a result of this method
  • throws: Xyster_Collection_Exception if the collection cannot be modified
  • access: public
boolean retainAll (Xyster_Collection_Interface $values)

Redefinition of:
Xyster_Collection_Abstract::retainAll()
Removes all values from the collection except for the ones specified

Inherited Methods

Inherited From Xyster_Collection_Abstract

Xyster_Collection_Abstract::add()
Xyster_Collection_Abstract::clear()
Xyster_Collection_Abstract::contains()
Xyster_Collection_Abstract::containsAll()
Xyster_Collection_Abstract::containsAny()
Xyster_Collection_Abstract::count()
Xyster_Collection_Abstract::getIterator()
Xyster_Collection_Abstract::isEmpty()
Xyster_Collection_Abstract::merge()
Xyster_Collection_Abstract::remove()
Xyster_Collection_Abstract::removeAll()
Xyster_Collection_Abstract::retainAll()
Xyster_Collection_Abstract::toArray()
Xyster_Collection_Abstract::__toString()

Documentation generated on Mon, 19 May 2008 17:07:03 -0400 by phpDocumentor 1.4.2