Beispiel #1
0
 /**
  * This constructor initializes this class with the specified collection.
  *
  * @access public
  * @final
  * @param IHashMap\Type $xs                                 the collection to be iterated
  */
 public final function __construct(IHashMap\Type $xs)
 {
     $this->iterator = new \RecursiveIteratorIterator(new IHashMap\RecursiveArrayOnlyIterator($xs->unbox()));
     $this->xs = $xs;
 }
Beispiel #2
0
 /**
  * This method returns an item after removing it from the hash map.
  *
  * @access public
  * @static
  * @param IHashMap\Type $xs                                 the hash map
  * @param Core\Type $k                                      the key associated with the
  *                                                          item to be removed
  * @return Core\Type                                        the item removed
  */
 public static function removeKey(IHashMap\Type $xs, Core\Type $k) : Core\Type
 {
     $zs = IHashMap\Type::box($xs->unbox());
     $zs->removeKey($k);
     return $zs;
 }