Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayList
  • NCollection
  • NHashtable
  • NSet

Interfaces

  • ICollection
  • IList
  • IMap
  • ISet

Exceptions

  • NKeyNotFoundException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NSet

Provides the base class for a collection that contains no duplicate elements.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by NCollection implements ICollection
Extended by NSet implements ISet
Package: Nette\Collections
Author: David Grudl
Located at Collections/Set.php
Methods summary
public boolean
# append( mixed $item )

Appends the specified element to the end of this collection.

Appends the specified element to the end of this collection.

Parameters

$item
mixed

Returns

boolean
true if this collection changed as a result of the call

Throws

InvalidArgumentException,
NotSupportedException
protected integer|false
# search( mixed $item )

Returns the index of the first occurrence of the specified element, or FALSE if this collection does not contain this element.

Returns the index of the first occurrence of the specified element, or FALSE if this collection does not contain this element.

Parameters

$item
mixed

Returns

integer|false

Throws

InvalidArgumentException
public
# offsetSet( $key, $item )

Not supported (only appending).

Not supported (only appending).

Implementation of

ArrayAccess::offsetSet
public
# offsetGet( $key )

Not supported.

Not supported.

Implementation of

ArrayAccess::offsetGet
public
# offsetExists( $key )

Not supported.

Not supported.

Implementation of

ArrayAccess::offsetExists
public
# offsetUnset( $key )

Not supported.

Not supported.

Implementation of

ArrayAccess::offsetUnset
Methods inherited from NCollection
__call(), __callStatic(), __clone(), __construct(), __get(), __isset(), __set(), __unset(), beforeAdd(), clear(), contains(), exchangeArray(), freeze(), getItemType(), getIterator(), getReflection(), import(), isFrozen(), remove(), setArray(), updating()
Methods inherited from ArrayObject
asort(), count(), getArrayCopy(), getFlags(), getIteratorClass(), ksort(), natcasesort(), natsort(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0