Nette\Collections\Set test

Adding numeric
Adding numeric
Adding non-numeric
InvalidArgumentException: Item must be numeric type.

Adding Jack
bool(TRUE)

Adding Mary
bool(TRUE)

Adding Mary second time
bool(FALSE)

Adding Larry
bool(TRUE)

Adding foo
InvalidArgumentException: Item must be 'Person' object.

Removing Larry
bool(TRUE)

Removing Larry second time
bool(FALSE)

Removing foo
bool(FALSE)

Contains Jack?
bool(TRUE)

Contains Larry?
bool(FALSE)

Contains foo?
bool(FALSE)

Count: 2
Count: 2
Get Interator:
My name is Jack
My name is Mary
(array):
array(2) {
  "92ce270f1cf59d14d3b5b90b76a2ffc0" => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
  "66b93df263808487917b2c6495bb5759" => object(Person) (1) {
    "name" private => string(4) "Mary"
  }
}

Clearing
Adding 'Jack'
bool(TRUE)

Adding 'Mary'
bool(TRUE)

Adding 'Mary' second time
bool(FALSE)

Adding 'Larry'
bool(TRUE)

Removing 'Larry'
bool(TRUE)

Removing 'Larry' second time
bool(FALSE)

array(2) {
  0 => string(4) "Jack"
  1 => string(4) "Mary"
}

Construct from collection
InvalidArgumentException: Item must be 'Person' object.

Construct from array
InvalidArgumentException: Item must be 'Person' object.

Construct as readonly
bool(TRUE)

Adding Jack
NotSupportedException: Collection is read-only.

Removing Jack
NotSupportedException: Collection is read-only.

Clearing
NotSupportedException: Collection is read-only.

Contains Jack?
bool(TRUE)