db
ArrayList Class Reference

Inherits ListCollection.

Public Member Functions

 __construct ($elements=[], $class=NULL)
 
 add ($element, $index=FALSE)
 
 addAll ($c)
 
 clear ()
 
 contains ($o)
 
 containsAll ($c)
 
 get ($index)
 
 getIterator ()
 
 indexOf ($o)
 
 isEmpty ()
 
 lastIndexOf ($o)
 
 remove ($index)
 
 removeAll ($c)
 
 removeElement ($o)
 
 retainAll ($c)
 
 set ($index, $element)
 
 size ()
 
 subList ($fromIndex, $toIndex)
 
 toArray ()
 
- Public Member Functions inherited from Collection
 add ($element)
 

Protected Member Functions

 outOfIndex ($index)
 

Protected Attributes

 $elements = []
 
 $class = NULL
 

Detailed Description

Description of ArrayList

Author
drymld

Constructor & Destructor Documentation

◆ __construct()

__construct (   $elements = [],
  $class = NULL 
)
Parameters
Collection | array | class$elementselementy seznamu nebo trida, ktara se ma v seznamu ukladat
class$classtrida, ktara se ma v seznamu ukladat

Member Function Documentation

◆ add()

add (   $e,
  $index = FALSE 
)

Appends the specified element to the end of this list (optional operation). pokud je nastaven $index Inserts the specified element at the specified position in this list (optional operation). a posune zbytek

Parameters
mixed$e
int$namena ktery index se ma pridat
Returns
boolean

Implements ListCollection.

◆ addAll()

addAll (   $c)

prida vsechny

Parameters
Collection | array$c
Returns
boolean

Implements Collection.

◆ clear()

clear ( )

odstrani vsechny prvky

Implements Collection.

◆ contains()

contains (   $o)
Parameters
mixed$oobsahuje element
bool$strictIf the second parameter strict is set to TRUE then the in_array() function will also check the types of the needle in the haystack.
Returns
boolean

Implements Collection.

◆ containsAll()

containsAll (   $c)
Parameters
Collection | array$c
Returns
boolean

Implements Collection.

◆ get()

get (   $index)

vrati prvek na indexu nebo vyvola vyjimku pokud je index mimo pole

Parameters
int$indexintex prvku

Implements ListCollection.

◆ getIterator()

getIterator ( )

◆ indexOf()

indexOf (   $o)
Parameters
type$o
Returns
int|FALSE vraci int pokud najde FALSE pokud nenajde

Implements ListCollection.

◆ isEmpty()

isEmpty ( )
Returns
boolean

Implements Collection.

◆ lastIndexOf()

lastIndexOf (   $o)
Parameters
type$o
Returns
int|FALSE vraci int pokud najde FALSE pokud nenajde

Implements ListCollection.

◆ outOfIndex()

outOfIndex (   $index)
protected

◆ remove()

remove (   $index)

odstrani prvek na indexu

Parameters
imxed$o
Returns
boolean

Implements ListCollection.

◆ removeAll()

removeAll (   $c)
Parameters
Collection | array$c
Returns
boolean

Implements Collection.

◆ removeElement()

removeElement (   $o)

odstrani dany element

Parameters
type$o
Returns
boolean

Implements Collection.

◆ retainAll()

retainAll (   $c)
Parameters
Collection | array$c
Returns
boolean

Implements Collection.

◆ set()

set (   $index,
  $element 
)

Replaces the element at the specified position in this list with the specified element (optional operation).

Returns
mixed the element previously at the specified position

Implements ListCollection.

◆ size()

size ( )
Returns
int

Implements Collection.

◆ subList()

subList (   $fromIndex,
  $toIndex 
)
Parameters
type$fromIndex
type$toIndex
Returns
ListCollection Description

Implements ListCollection.

◆ toArray()

toArray ( )
Returns
array Description

Implements Collection.

Member Data Documentation

◆ $class

$class = NULL
protected

◆ $elements

$elements = []
protected

kolekce ulozenych prvku


The documentation for this class was generated from the following file: