Class ArrayList

Description

Implements interfaces:

  • Iterator (internal interface)

Located in /ExtensionLib.php (line 185)


	
			
Variable Summary
mixed $valid
array $_elements
Method Summary
ArrayList ArrayList ([string $elements = null])
void add ( $index, [ $element = null])
boolean addAll (ArrayList $list)
void clear ()
boolean contains (mixed $element)
void current ()
mixed get (integer $index)
mixed indexOf (mixed $element)
boolean isEmpty ()
void key ()
mixed lastIndexOf (mixed $element)
void next ()
mixed remove (integer $index)
void removeRange (integer $start, integer $end)
void rewind ()
mixed set (integer $index, mixed $element)
integer size ()
array toArray ()
void valid ()
Variables
mixed $valid = FALSE (line 366)

A switch to keep track of the end of the array

A switch to keep track of the end of the array

  • access: private
array $_elements (line 189)
  • access: private
Methods
Constructor ArrayList (line 197)

Create an ArrayList with the specified elements.

Create an ArrayList with the specified elements.

  • access: public
ArrayList ArrayList ([string $elements = null])
  • string $elements
add (line 213)

Appends the specified element to the end of this list.

Appends the specified element to the end of this list.

  • access: public
void add ( $index, [ $element = null])
  • $index
  • $element
addAll (line 232)

Appends all of the elements in the specified ArrayList to the end of this list, in the order that they are returned by the specified ArrayList's ListIterator.

Appends all of the elements in the specified ArrayList to the end of this list, in the order that they are returned by the specified ArrayList's ListIterator.

  • access: public
boolean addAll (ArrayList $list)
clear (line 247)

Removes all of the elements from this list.

Removes all of the elements from this list.

  • access: public
void clear ()
contains (line 257)

Returns true if this list contains the specified element.

Returns true if this list contains the specified element.

  • access: public
boolean contains (mixed $element)
  • mixed $element
current (line 379)

Return the current array element

Return the current array element

void current ()

Implementation of:
Iterator::current
get (line 267)

Returns the element at the specified position in this list.

Returns the element at the specified position in this list.

  • access: public
mixed get (integer $index)
  • integer $index
indexOf (line 277)

Searches for the first occurence of the given argument.

Searches for the first occurence of the given argument.

  • access: public
mixed indexOf (mixed $element)
  • mixed $element
isEmpty (line 286)

Tests if this list has no elements.

Tests if this list has no elements.

  • access: public
boolean isEmpty ()
key (line 386)

Return the key of the current array element

Return the key of the current array element

void key ()

Implementation of:
Iterator::key
lastIndexOf (line 297)

Returns the index of the last occurrence of the specified object in this list.

Returns the index of the last occurrence of the specified object in this list.

  • access: public
mixed lastIndexOf (mixed $element)
  • mixed $element
next (line 394)

Move forward by one

Move forward by one PHP's next() returns false if there are no more elements

void next ()

Implementation of:
Iterator::next
remove (line 311)

Removes the element at the specified position in this list.

Removes the element at the specified position in this list.

  • access: public
mixed remove (integer $index)
  • integer $index
removeRange (line 326)

Removes from this List all of the elements whose index is between start, inclusive and end, exclusive.

Removes from this List all of the elements whose index is between start, inclusive and end, exclusive.

  • access: public
void removeRange (integer $start, integer $end)
  • integer $start
  • integer $end
rewind (line 372)

Return the array "pointer" to the first element

Return the array "pointer" to the first element PHP's reset() returns false if the array has no elements

void rewind ()

Implementation of:
Iterator::rewind
set (line 338)

Replaces the element at the specified position in this list with the specified element.

Replaces the element at the specified position in this list with the specified element.

  • access: public
mixed set (integer $index, mixed $element)
  • integer $index
  • mixed $element
size (line 349)

Returns the number of elements in this list.

Returns the number of elements in this list.

  • access: public
integer size ()
toArray (line 359)

Returns an array containing all of the elements in this list in the correct order.

Returns an array containing all of the elements in this list in the correct order.

  • access: public
array toArray ()
valid (line 401)

Is the current element valid?

Is the current element valid?

void valid ()

Implementation of:
Iterator::valid

Documentation generated on Thu, 20 Mar 2008 16:22:20 -0400 by phpDocumentor 1.4.0