Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Entity\ItemIdSet Class Reference

Immutable set of ItemId objects. More...

+ Inheritance diagram for Wikibase\DataModel\Entity\ItemIdSet:
+ Collaboration diagram for Wikibase\DataModel\Entity\ItemIdSet:

Public Member Functions

 __construct (array $ids=[])
 
 count ()
 
 getIterator ()
 
 getSerializations ()
 
 has (ItemId $id)
 
 equals ( $target)
 

Private Attributes

 $ids = []
 

Detailed Description

Immutable set of ItemId objects.

Unordered and unique. The constructor filters out duplicates.

Since
0.7.4
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Entity\ItemIdSet::__construct ( array  $ids = [])
Parameters
ItemId[]$ids
Exceptions
InvalidArgumentException

Member Function Documentation

◆ count()

Wikibase\DataModel\Entity\ItemIdSet::count ( )
See also
Countable::count
Returns
int

◆ equals()

Wikibase\DataModel\Entity\ItemIdSet::equals (   $target)
See also
Countable::equals
Since
0.1
Parameters
mixed$target
Returns
bool

◆ getIterator()

Wikibase\DataModel\Entity\ItemIdSet::getIterator ( )
See also
IteratorAggregate::getIterator
Returns
Iterator|ItemId[]

◆ getSerializations()

Wikibase\DataModel\Entity\ItemIdSet::getSerializations ( )
Since
2.5
Returns
string[]

◆ has()

Wikibase\DataModel\Entity\ItemIdSet::has ( ItemId  $id)
Parameters
ItemId$id
Returns
bool

Member Data Documentation

◆ $ids

Wikibase\DataModel\Entity\ItemIdSet::$ids = []
private

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