{@inheritdoc}

@see \IPLib\Range\RangeInterface::containsRange()
558958
public function containsRange(RangeInterface $range)
    {
        $result = false;
        if ($range->getAddressType() === $this->getAddressType()) {
            if ($range->toString(false) === $this->toString(false)) {
                $result = true;
            }
        }

        return $result;
    }
457198
public boolean isAfterRange(Range<T> otherRange) {
    if (otherRange == null) { return false; }
    return isAfter(otherRange.max);
  }
1146928
public boolean inRange(InetAddress ip) throws FilterException {
        Iterator iter = ranges.iterator();
        while (iter.hasNext()) {
            IPAddressRange range = (IPAddressRange) iter.next();
            if (range.inRange(ip)) {
                return true;
            }
        }

        return false;
    }
215809
public function asInt(NumberRange $range = null)
    {
        return $this->handleFilter(
                function() use($range)
                {
                    return filter\RangeFilter::wrap(
                            filter\IntegerFilter::instance(),
                            $range
                    );
                }
        );
    }
166628
public function ipInRange($ip, $from, $to)
    {
        $ip = $this->getIpNumberFromAddress($ip);
        $from = $this->getIpNumberFromAddress($from);
        $to = $this->getIpNumberFromAddress($to);

        return (!$ip || !$from || !$to) ? false : ($ip <= $to && $from <= $ip);
    }
1284248
@Override
  public boolean contains(IVersion version)
  {
    for (IVersionRange range : ranges) {
      if (range.contains(version)) {
        return true;
      }
    }
    return false;
  }
1342150
public function setRange($pRange = '') {
		// Uppercase coordinate
		$cellAddress = explode('!',strtoupper($pRange));
		if (count($cellAddress) > 1) {
			list($worksheet,$pRange) = $cellAddress;
		}

		if (strpos($pRange,':') !== FALSE) {
			$this->_range = $pRange;
		} elseif(empty($pRange)) {
			$this->_range = '';
		} else {
			throw new PHPExcel_Exception('Autofilter must be set on a range of cells.');
		}

		if (empty($pRange)) {
			//	Discard all column rules
			$this->_columns = array();
		} else {
			//	Discard any column rules that are no longer valid within this range
			list($rangeStart,$rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->_range);
			foreach($this->_columns as $key => $value) {
				$colIndex = PHPExcel_Cell::columnIndexFromString($key);
				if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) {
					unset($this->_columns[$key]);
				}
			}
		}

		return $this;
	}
1159101
public boolean containsRange(final Range<T> other) {
        if (other == null) {
            return false;
        }

        return (other.lowerEndpoint.isClosed ? contains(other.lowerEndpoint.value) : lowerEndpoint.value.compareTo(other.lowerEndpoint.value) <= 0)
                && (other.upperEndpoint.isClosed ? contains(other.upperEndpoint.value) : upperEndpoint.value.compareTo(other.upperEndpoint.value) >= 0);
    }
1276064
private boolean isWithinRange(T value) {
        if (getMinInclusive() != null
                && compareTo(getMinInclusive(), value) > 0) {
            return false;
        }
        if (getMaxInclusive() != null
                && compareTo(getMaxInclusive(), value) < 0) {
            return false;
        }
        return true;
    }
1020789
public function getIpsForRange($ipRange)
    {
        $range = IPUtils::getIPRangeBounds($ipRange);
        if ($range === null) {
            return false;
        }

        return array(IPUtils::binaryToStringIP($range[0]), IPUtils::binaryToStringIP($range[1]));
    }
252132
public function hasForRange($key, \DateTime $start, \DateTime $end)
    {
        return array_key_exists($this->keyForRange($key, $start, $end), $this->data);
    }
236059
public static function getIPRangeBounds($ipRange)
    {
        if (strpos($ipRange, '/') === false) {
            $ipRange = self::sanitizeIpRange($ipRange);

            if ($ipRange === null) {
                return null;
            }
        }
        $pos = strpos($ipRange, '/');

        $bits = substr($ipRange, $pos + 1);
        $range = substr($ipRange, 0, $pos);
        $high = $low = @inet_pton($range);
        if ($low === false) {
            return null;
        }

        $lowLen = strlen($low);
        $i = $lowLen - 1;
        $bits = $lowLen * 8 - $bits;

        for ($n = (int)($bits / 8); $n > 0; $n--, $i--) {
            $low[$i] = chr(0);
            $high[$i] = chr(255);
        }

        $n = $bits % 8;
        if ($n) {
            $low[$i] = chr(ord($low[$i]) & ~((1 << $n) - 1));
            $high[$i] = chr(ord($high[$i]) | ((1 << $n) - 1));
        }

        return array($low, $high);
    }
1116350
@Override
  public boolean intersects(IVersionRange yourRange)
  {
    // The set has explicit versions, so just check these against the supplied range
    for (IVersion version : set) {
      if (yourRange.contains(version)) {
        return true;
      }
    }
    return false;
  }
626070
private function inRange($ip, $cidr, $range)
    {
        $ipVersion = $this->getIpVersion($ip);
        $binIp = $this->ip2bin($ip);

        $parts = explode('/', $range);
        $net = array_shift($parts);
        $range_cidr = array_shift($parts);


        $netVersion = $this->getIpVersion($net);
        if ($ipVersion !== $netVersion) {
            return false;
        }
        if ($range_cidr === null) {
            $range_cidr = $netVersion === 4 ? static::IPV4_ADDRESS_LENGTH : static::IPV6_ADDRESS_LENGTH;
        }

        $binNet = $this->ip2bin($net);
        if (substr($binIp, 0, $range_cidr) === substr($binNet, 0, $range_cidr) && $cidr >= $range_cidr) {
            return true;
        }
        return false;
    }
1194685
private function projectRange(IPRange $range)
    {
        $result = [
            $range->getIpRange()->toString(),
            $range->getIpRange()->getComparableStartString(),
            $range->getIpRange()->getComparableEndString(),
        ];
        if ($this->type === IPService::IPRANGETYPE_BLACKLIST_AUTOMATIC) {
            $dt = $range->getExpires();
            if ($dt === null) {
                $result[] = '';
            } else {
                $result[] = $this->dateHelper->formatCustom('c', $dt);
            }
        }

        return $result;
    }
34662
public function range($value, int $min, int $max): bool
    {
        return is_string($value)
            && (mb_strlen($trimmed = trim($value)) >= $min)
            && (mb_strlen($trimmed) <= $max);
    }
165048
public function contains( $item ) {
			
			for ( $i=0; $i < $this->len; $i++ ) {
			
				if ( $this->compare( $item, $this->items[$i] ) === 0 ) {
			
					return true;
			
				}
			
			}

			return false;
		}