ValueObjects\Structure\Dictionary::containsKey PHP Method

containsKey() public method

Tells whether $object is one of the keys
public containsKey ( ValueObjects\ValueObjectInterface $object ) : boolean
$object ValueObjects\ValueObjectInterface
return boolean
    public function containsKey(ValueObjectInterface $object)
    {
        $keys = $this->keys();
        return $keys->contains($object);
    }

Usage Example

Example #1
0
 public function testContainsKey()
 {
     $one = new Integer(1);
     $ten = new Integer(10);
     $this->assertTrue($this->dictionary->containsKey($one));
     $this->assertFalse($this->dictionary->containsKey($ten));
 }