/**
  * Returns the number of children TreeNodes the receiver contains.
  * @return int
  */
 public function getChildCount()
 {
     return $this->children->size();
 }
 /**
  * Construct a ReverseListIterator
  * @param ListInterface $list
  */
 public function __construct(ListInterface $list)
 {
     $this->index = $list->size();
     $this->list = $list;
 }
 /**
  * Returns true if this list iterator has more elements when traversing the list in the forward direction.
  * @return boolean
  */
 public function hasNext()
 {
     return $this->index + 1 < $this->list->size();
 }