Returns true if the address is within the given location

@param location
@param address
a address that may point into the section
@return true iff address is within location
972941
private static boolean addressIsWithin(Location location, long address) {
        long endpoint = location.from() + location.size();
        return address >= location.from() && address < endpoint;
    }
235106
public boolean isValidInet4Address(String inet4Address) {
        // verify that address conforms to generic IPv4 format
        String[] groups = ipv4Validator.match(inet4Address);

        if (groups == null) {
            return false;
        }

        // verify that address subgroups are legal
        for (String ipSegment : groups) {
            if (ipSegment == null || ipSegment.length() == 0) {
                return false;
            }

            int iIpSegment = 0;

            try {
                iIpSegment = Integer.parseInt(ipSegment);
            } catch(NumberFormatException e) {
                return false;
            }

            if (iIpSegment > IPV4_MAX_OCTET_VALUE) {
                return false;
            }

            if (ipSegment.length() > 1 && ipSegment.startsWith("0")) {
                return false;
            }

        }

        return true;
    }
935849
public void setAddress(final String address) {
		// Do we have a subaddressing account?
		Preconditions.checkArgument(StringUtils.startsWith(this.address, accountId + "+"),
				"Mail address can only be changed when subaddressing is active");
		Preconditions.checkArgument(StringUtils.startsWith(address, accountId), "New mail address %s does not start with accountId=%s", address,
				accountId);
		log.info("Changing mail address from {} to {}", this.address, address);
		this.address = address;
	}
1174026
def matches_address(self, address):
        
        if self.address == address:
            return True
        for alias in self.aliases:
            if alias == address:
                return True
        if self._alias_regexp and self._alias_regexp.match(address):
            return True
        return False
520998
public void setInetAddress(final String address) {
        try {
            this.inetAddress = InetAddress.getByName(address);
        } catch (final UnknownHostException e) {
            throw new RuntimeException("Invalid address " + address);
        }
    }
581171
public static void validateAddress(String address) {
		// Check for improperly formatted addresses
		Matcher matcher = ADDRESS_PATTERN.matcher(address);
		if(!matcher.matches()) {
			String message = "The address must have the format X.X.X.X";
			throw new IllegalArgumentException(message);
		}

		// Check for out of range address components
		for(int i = 1; i <= 4; i++) {
			int component = Integer.parseInt(matcher.group(i));
			if(component < 0 || component > 255) {
				String message = "All address components must be in the range [0, 255]";
				throw new IllegalArgumentException(message);
			}
		}
	}
681471
public static boolean isValidRoutingMulticast(final InetAddress address)
	{
		return address != null && address.isMulticastAddress()
				&& toLong(address) >= toLong(Discoverer.SYSTEM_SETUP_MULTICAST);
	}
1003756
def has_space?(address, size)
      node = self
      loop do
        if node.blob_address == address
          return size == node.size
        elsif size < node.size && node.smaller
          node = node.smaller
        elsif size > node.size && node.larger
          node = node.larger
        elsif size == node.size && node.equal
          node = node.equal
        else
          return false
        end
      end
    end
585063
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasLocationFeature(Context context) {
        return hasLocationFeature(context.getPackageManager());
    }
4430
public static ErrorCode isAddressValid(String address){
        if (!isMustFieldValid( address, ipRegEx)) {
            return ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR;
        }
        return ErrorCode.OK;
    }
260726
public void setInetAddress(InetSocketAddress address) {
		this.value = address.getAddress();
		this.type = AttributeType.INET_ADDRESS;
		this.assigned = this.value != null;
	}
38827
public static boolean isAbsoluteUrl(String location) {
        if (location != null && location.length() > 0 && location.contains(":")) {
            try {
                URI uri = new URI(location);
                return uri.getScheme() != null;
            } catch (URISyntaxException e) {
                // ignore invalid locations and consider not absolute
            }
        }
        return false;
    }
543742
public boolean containsMember(Address mbr) {
        if(mbr == null || members == null)
            return false;
        for(Address member: members)
            if(Objects.equals(member, mbr))
                return true;
        return false;
    }
122365
public static InetAddress inetAddressFromLocation(String location) {
        try {
            return InetAddress.getByName(location);
        } catch (UnknownHostException e) {
            throw new DeepIOException(e);
        }
    }
1040840
public void setAddressLocation(GeoPosition addressLocation)
    {
        GeoPosition old = getAddressLocation();
        this.addressLocation = addressLocation;
        setCenter(getTileFactory().geoToPixel(addressLocation, getZoom()));

        firePropertyChange("addressLocation", old, getAddressLocation());
        repaint();
    }
1205748
@Override
    public boolean hasLocation(JavaFileManager.Location location) {
        proc.debug(DBG_FMGR, "hasLocation: location: %s\n", location);
        return stdFileManager.hasLocation(location);
    }
1202045
public function contains(Address $address)
    {
        $addressValue = $address->get();

        return $addressValue >= $this->firstAddress->get() && $addressValue <= $this->lastAddress->get();
    }