Sgss_Collection_List_Abstract 
Abstract class for indexed collection

Description

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

Direct descendant

Sgss_Collection_Array_List Represents an indexed collection using array

Class overview

Methods

boolean addAll (array|object $t)

Appends all the elements in the specified object at the end of this list

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

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

boolean insertAll (int $index, array|object $t)

Inserts or appends all the elements in the specified object at the specified index

boolean isEmpty ()

Determines whether this list contains no element

mixed key ()
mixed next ()
boolean offsetExists (mixed $offset)
mixed offsetGet (mixed $offset)
mixed offsetSet (mixed $offset, mixed $value)
void offsetUnset (mixed $offset)
boolean removeAll (array|object $t)

Removes all the elements in the specified object from this list

void rewind ()
boolean valid ()

Method detail

addAll

Appends all the elements in the specified object at the end of this list

Parameters:
  • array|object $t

    Object containing elements to be appended

Returns:
boolean -- True when the operation changed this list
Throws:
  • Sgss_Collection_List_Exception

    When the specified object is untraversable

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


count

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


current

Uses:
Sgss_Collection_List_Abstract::valid(), Sgss_Collection_List_Interface::get()
Used by:
Sgss_Collection_List_Abstract::next()
Related subject:
Iterator::current()
Signature:
public mixed current ()


hasAll

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

Parameters:
  • array|object $t

    Object containing elements to determine

Returns:
boolean -- True when this list contains the all the element in the specified object
Throws:
  • Sgss_Collection_List_Exception

    When the specified object is untraversable

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


insertAll

Inserts or appends all the elements in the specified object at the specified index

Parameters:
  • int $index

    Index to insert at

  • array|object $t

    Object containing elements to be inserted

Returns:
boolean -- True when the operation changed this list
Throws:
  • Sgss_Collection_List_Exception

    When the specified object is untraversable

Specified by:
Uses:
Sgss_Collection_List_Interface::insert()
Related subject:
Sgss_Collection_List_Interface::insertAll()
Signature:
public boolean insertAll (int $index, array|object $t)


isEmpty

Determines whether this list contains no element

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


key

Related subject:
Iterator::key()
Signature:
public mixed key ()


next

Uses:
Sgss_Collection_List_Abstract::current()
Related subject:
Iterator::next()
Signature:
public mixed next ()


offsetExists

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_List_Interface::size()
Related subject:
ArrayAccess::offsetExists()
Signature:
public boolean offsetExists (mixed $offset)


offsetGet

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_List_Interface::get()
Related subject:
ArrayAccess::offsetGet()
Signature:
public mixed offsetGet (mixed $offset)


offsetSet

Parameters:
  • mixed $offset
  • mixed $value
Uses:
Sgss_Collection_List_Interface::add(), Sgss_Collection_List_Interface::set()
Related subject:
ArrayAccess::offsetSet()
Signature:
public mixed offsetSet (mixed $offset, mixed $value)


offsetUnset

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_List_Interface::drop()
Related subject:
ArrayAccess::offsetUnset()
Signature:
public void offsetUnset (mixed $offset)


removeAll

Removes all the elements in the specified object from this list

Parameters:
  • array|object $t

    Object containing the elements to be removed

Returns:
boolean -- True when the operation changed this list
Throws:
  • Sgss_Collection_List_Exception

    When the specified object is untraversable

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


rewind

Related subject:
Iterator::rewind()
Signature:
public void rewind ()


valid

Uses:
Sgss_Collection_List_Interface::size()
Used by:
Sgss_Collection_List_Abstract::current()
Related subject:
Iterator::valid()
Signature:
public boolean valid ()