Checks if the given string in a supported value
    is an address in any of the known formats.
435205
def is_address(value: Any) -> bool:
    
    if is_checksum_formatted_address(value):
        return is_checksum_address(value)
    elif is_hex_address(value):
        return True
    elif is_binary_address(value):
        return True
    else:
        return False
260291
public static boolean isValidIPV4Address(String value) {

        int periods = 0;
        int i = 0;
        int length = value.length();

        if (length > 15)
            return false;
        char c = 0;
        String word = "";
        for (i = 0; i < length; i++) {
            c = value.charAt(i);
            if (c == '.') {
                periods++;
                if (periods > 3)
                    return false;
                if (word == "")
                    return false;
                if (Integer.parseInt(word) > 255)
                    return false;
                word = "";
            } else if (!(Character.isDigit(c)))
                return false;
            else {
                if (word.length() > 2)
                    return false;
                word += c;
            }
        }

        if (word == "" || Integer.parseInt(word) > 255)
            return false;
        if (periods != 3)
            return false;
        return true;
    }
430042
private static boolean isToken(String value) {
        // ----- BEGIN android -----
        if (RESERVED_NAMES.contains(value.toLowerCase(Locale.US))) {
            return false;
        }
        // ----- END android -----

        int len = value.length();

        for (int i = 0; i < len; i++) {
            char c = value.charAt(i);

            if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1)
                return false;
        }
        return true;
    }
575846
public static function isIpAddress($value): bool
    {
        if (!static::isStringCastable($value)) {
            return false;
        }

        return filter_var((string) $value, FILTER_VALIDATE_IP) !== false;
    }
1049176
public static boolean isValidFqcn(String str) {
    if (isNullOrEmpty(str)) {
      return false;
    }
    final String[] parts = str.split("\\.");
    if (parts.length < 2) {
      return false;
    }
    for (String part : parts) {
      if (!isValidJavaIdentifier(part)) {
        return false;
      }
    }
    return true;
  }
1270326
function verifyAddress(address) {
  var ifs = os.networkInterfaces();
  var nics = Object.keys(ifs);
  var i, j, match = false;
  nicLoop:
    for (i = 0; i < nics.length; i++) {
      var nic = ifs[nics[i]];
      for (j = 0; j < nic.length; j++) {
        if (nic[j].address === address && !nic[j].internal) {
          match = true;
          break nicLoop;
        }
      }
    }
  return match;
}
100824
def __isValidUrl(self, addr):
        
        regex = re.compile(
            r'^(?:http)s?://'  #: http:// or https://
            r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'  #: domain...
            r'localhost|'  #: localhost...
            r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'  #: ...or ip
            r'(?::\d+)?'  #: optional port
            r'(?:/?|[/?]\S+)$', re.IGNORECASE)
        if addr and isinstance(addr, string_types):
            if regex.match(addr):
                return True
        return False
263884
public boolean acceptsValue(String value) {
		if (value==null) {
			return false;
		} else if (hasValues()) {
			return getValuesList().contains(value);
		} else {
			return true;
		}
	}
1116480
def valid_address(address):
    
    if not address:
        return False

    components = str(address).split(':')
    if len(components) > 2 or not valid_hostname(components[0]):
        return False

    if len(components) == 2 and not valid_port(components[1]):
        return False

    return True
1132929
private static boolean missingFormatArgs(String value) {
    try {
      Formatter.check(value);
    } catch (MissingFormatArgumentException e) {
      return true;
    } catch (Exception ignored) {
      // we don't care about other errors (it isn't supposed to be a format string)
    }
    return false;
  }
1223805
private boolean getThenPerformAdj(int operation, int position, boolean value) {
		checkMutable();
		final int i = position >> ADDRESS_BITS;
		final long m = 1L << (position & ADDRESS_MASK);
		final long v = bits[i] & m;
		switch(operation) {
		case SET :
			if (value) {
				bits[i] |=  m;
			} else {
				bits[i] &= ~m;
			}
			break;
		case AND :
			if (value) {
				/* no-op */
			} else {
				bits[i] &= ~m;
			}
			break;
		case OR :
			if (value) {
				bits[i] |=  m;
			} else {
				/* no-op */
			}
			break;
		case XOR :
			if (value) {
				bits[i] ^=  m;
			} else {
				/* no-op */
			}
			break;
		}
		return v != 0;
	}
248539
public boolean has(String value) {
		addToDefaults(value, null);
		unrequestedParameters.remove(value);
		return data.containsKey(value);
	}
1275588
private boolean validFormat(final String s) {
        String[] args = ARGS_REGEX.split(s);
        if (noItems(args)) return false;
        if (args.length < 3) return false;

        // Check for the presence of a function name
        String name = args[0];
        if (name.isEmpty()) return false;
        if (!validFunction(name)) return false;

        // Check for the presence of a return type
        String returntype = args[args.length - 1];
        if (returntype.isEmpty()) return false;
        if (!validReturnType(returntype)) return false;

        // Check for zero or more arguments
        String arglist = args[1];
        if (arglist.isEmpty()) return true;

        // Split parameters on comma
        String[] argsplit = arglist.split(",");
        for (final String arg : argsplit) {
            if (!validParameter(arg)) return false;
        }
        return true;
    }
537307
public boolean isMatch(InetAddress inetAddress)
  {
    byte []bytes = inetAddress.getAddress();

    if (bytes.length != _address.length)
      return false;

    for (int i = 0; i < bytes.length; i++) {
      if (bytes[i] == _address[i]) {
      }
      else if (_subnetByte < i) {
        return true;
      }
      else if (i == _subnetByte) {
        return (bytes[i] & _subnetMask) == (_address[i] & _subnetMask);
      }
      else {
        return false;
      }
    }

    return true;
  }
791157
public boolean isPermittedAddress(String addr) {
        if (addr == null || addr.isEmpty()) {
            return false;
        }

        for (DomainMatcher permAddr : permittedAddressesEnabled) {
            if (permAddr.matches(addr)) {
                return true;
            }
        }
        return false;
    }
266864
function isValidId(value :any) :boolean {

  return Object.prototype.toString.call(value) === STRING_TAG && value.length > 0;
}
492635
def in6_isvalid(address):
    """"""

    try:
        socket.inet_pton(socket.AF_INET6, address)
        return True
    except Exception:
        return False