Are Identical.

@return boolean Whether both inner iterators are valid and have identical
current and key values or both are non valid.
8214
public function areIdentical()
    {
        return $this->valid()
            ? $this->lhs->current() === $this->rhs->current()
            && $this->lhs->key() === $this->rhs->key()
            : $this->lhs->valid() == $this->rhs->valid();
    }
644252
public function valid(): bool
    {
        if (!$this->isUsed) {
            $this->call
                ->addIterableEvent($this->callEventFactory->createUsed());

            if ($this->traversable instanceof IteratorAggregate) {
                $this->iterator = $this->traversable->getIterator();
            } else {
                $this->iterator = $this->traversable;
            }

            $this->isUsed = true;
        }

        if ($isValid = $this->iterator->valid()) {
            $this->key = $this->iterator->key();
            $this->value = $this->iterator->current();
        } else {
            $this->key = null;
            $this->value = null;
        }

        if ($this->isConsumed) {
            return $isValid;
        }

        if ($isValid) {
            $this->call->addIterableEvent(
                $this->callEventFactory
                    ->createProduced($this->key, $this->value)
            );
        } else {
            $this->call->setEndEvent($this->callEventFactory->createConsumed());
            $this->isConsumed = true;
        }

        return $isValid;
    }
29178
public function valid(): bool
    {
        if ($this->cacheFilesIterator === null) {
            $this->rewind();
        }
        return $this->cacheFilesIterator->valid();
    }
52911
public function valid()
    {
        if (is_null($this->current)) {
            return true;
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            return $this->current->valid();
        }

        return false;
    }
281880
function it_should_be_unique(){
        $ids = [];
        $iterations = 100;

        for($i=0; $i < $iterations; $i++){
            $ids[] = $this->getWrappedObject()->generate();
        }

        return (count(array_values($ids)) === $iterations);
    }
464345
protected boolean collectionsEqual(Collection a1, Collection a2) {
		if (a1 != null && a2 != null && a1.size() == a2.size()) {
			// Loop over each element and compare them using our comparator
			Iterator iterA1 = a1.iterator();
			Iterator iterA2 = a2.iterator();
			while (iterA1.hasNext()) {
				if (!equalByComparator(iterA1.next(), iterA2.next())) {
					return false;
				}
			}
		}
		else if (a1 == null && a2 == null) {
			return true;
		}
		return false;
	}
1141848
public function valid() : bool
    {
        // The null check is cardinal; without it foreach runs out of bounds.
        $key = key($this->explorableIndex);
        return $key !== null && $key < count($this->explorableIndex);
    }
448055
protected function original_is_equivalent( $key, $current ) {
		if ( ! array_key_exists( $key, $this->original ) ) {
			return false;
		}

		$original = $this->original[ $key ];

		if ( $current === $original ) {
			return true;
		} elseif ( is_null( $current ) ) {
			return false;
		} elseif ( $this->has_cast( $key ) ) {
			return $this->cast_attribute( $key, $current ) === $this->cast_attribute( $key, $original );
		}

		// Binary safe string comparison for numberic attribute.
		return is_numeric( $current ) && is_numeric( $original ) &&
			strcmp( (string) $current, (string) $original ) === 0;
	}
1137310
public function isKey()
    {
        $args = func_get_args();
        
        if (count($args) == 0) {
            return $this;
        }
        
        $last = array_pop($args);
        
        $pointer = &$this->data;
        foreach ($args as $i => $step) {
            if (!isset($pointer[$step])
                || !is_array($pointer[$step])
            ) {
                return false;
            }

            $pointer = &$pointer[$step];
        }
        
        if (!isset($pointer[$last])) {
            return false;
        }
        
        return true;
    }
445804
private function isResourceName(\ArrayIterator $iterator): bool
    {
        return !(
            $this->isTTL($iterator) ||
            Classes::isValid(strtoupper($iterator->current())) ||
            RDataTypes::isValid(strtoupper($iterator->current()))
        );
    }
1094033
public function valid()
    {
        if (!parent::valid()) {
            return false;
        }

        $current = $this->current();
        $key = $this->key();
        $condition = $this->_condition;

        return !$condition($current, $key, $this->_innerIterator);
    }
88703
public function all(callable $iterator) : bool
    {
        foreach ($this as $k => $v) {
            if (!call_user_func($iterator, $v, $k, $this)) {
                return false;
            }
        }
        return true;
    }
106696
public boolean sameTypes(Schema schema) {
        if (schema.numColumns() != numColumns())
            return false;
        for (int i = 0; i < schema.numColumns(); i++) {
            if (getType(i) != schema.getType(i))
                return false;
        }

        return true;
    }
1052472
public function valid() : bool
    {
        if ($this->pointer >= 0 && $this->pointer < $this->collection->length()) {
            return true;
        } else {
            return false;
        }
    }
1192655
public function valid()
    {
        if (isset($this->objects[$this->position])) {
            return true;
        }

        if ($this->currentData == null) {
            return false;
        }

        return $this->generator->valid();
    }
611670
private function isRelated()
    {
        $isRelated = false;
        $idSuffix = '_id';
        $pos = strrpos($this->key, $idSuffix);

        if ($pos !== false
            && strlen($this->key) - strlen($idSuffix) === $pos
        ) {
            $isRelated = true;
        }

        return $isRelated;
    }
588459
@Override
    public boolean hasConcurrents() {
        if (concurrents > 0) {
            return true;
        }
        if (CommonUtils.isNotEmpty(methods)) {
            for (MethodConfig methodConfig : methods.values()) {
                if (methodConfig.getConcurrents() != null
                    && methodConfig.getConcurrents() > 0) {
                    return true;
                }
            }
        }
        return false;
    }