query-by method for field address1
@param address1 the specified attribute
@return an Iterable of DUsers for the specified address1
499409
public Iterable<DUser> queryByAddress1(java.lang.String address1) {
    return queryByField(null, DUserMapper.Field.ADDRESS1.getFieldName(), address1);
  }
344086
public Iterable<DUser> queryByAddress2(java.lang.String address2) {
    return queryByField(null, DUserMapper.Field.ADDRESS2.getFieldName(), address2);
  }
222192
private List<CompletableFuture<Channel>> getChannelPool(Address address) {
    List<CompletableFuture<Channel>> channelPool = channels.get(address);
    if (channelPool != null) {
      return channelPool;
    }
    return channels.computeIfAbsent(address, e -> {
      List<CompletableFuture<Channel>> defaultList = new ArrayList<>(size);
      for (int i = 0; i < size; i++) {
        defaultList.add(null);
      }
      return Lists.newCopyOnWriteArrayList(defaultList);
    });
  }
1353855
public static InetSocketAddress[] parseAddressList(String[] addresses) {
        InetSocketAddress[] isa = new InetSocketAddress[addresses.length];
        for (int x = 0; x < addresses.length; x++) {
            isa[x] = createInetSocketAddress(addresses[x]);
        }
        return isa;
    }
1352725
def paddr(address):
    
    if not isinstance(address, six.string_types):
        raise TypeError('expecting a string')
    if address.startswith('['):
        p1 = address.find(']:')
        if p1 == -1:
            raise ValueError
        return (address[1:p1], int(address[p1+2:]))
    elif ':' in address:
        p1 = address.find(':')
        return (address[:p1], int(address[p1+1:]))
    else:
        return address
896711
public T findOne(T query, T fields) {
        return findOne(query, fields, getReadPreference());
    }
388095
def occupied_by_sort(self, address):
        

        idx = self._search(address)
        if len(self._list) <= idx:
            return None
        if self._list[idx].start <= address < self._list[idx].end:
            return self._list[idx].sort
        if idx > 0 and address < self._list[idx - 1].end:
            # TODO: It seems that this branch is never reached. Should it be removed?
            return self._list[idx - 1].sort
        return None
1118647
def _addr(self):
        
        group_by = self._config['address_group_by']

        assert not self._flags['address'], "{} address already assigned".format(self._name)
        assert group_by in ('element', 'variable')

        m0 = self.system.dae.m
        n0 = self.system.dae.n
        mend = m0 + len(self._algebs) * self.n
        nend = n0 + len(self._states) * self.n

        if group_by == 'variable':
            for idx, item in enumerate(self._algebs):
                self.__dict__[item] = list(
                    range(m0 + idx * self.n, m0 + (idx + 1) * self.n))
            for idx, item in enumerate(self._states):
                self.__dict__[item] = list(
                    range(n0 + idx * self.n, n0 + (idx + 1) * self.n))
        elif group_by == 'element':
            for idx, item in enumerate(self._algebs):
                self.__dict__[item] = list(
                    range(m0 + idx, mend, len(self._algebs)))
            for idx, item in enumerate(self._states):
                self.__dict__[item] = list(
                    range(n0 + idx, nend, len(self._states)))

        self.system.dae.m = mend
        self.system.dae.n = nend

        self._flags['address'] = True
931249
public AddressResolver<InetSocketAddress> asAddressResolver() {
        AddressResolver<InetSocketAddress> result = addressResolver;
        if (result == null) {
            synchronized (this) {
                result = addressResolver;
                if (result == null) {
                    addressResolver = result = new InetSocketAddressResolver(executor(), this);
                }
            }
        }
        return result;
    }
626234
public void sortByProximity(final InetAddress address, List<InetAddress> addresses)
    {
        Collections.sort(addresses, new Comparator<InetAddress>()
        {
            public int compare(InetAddress a1, InetAddress a2)
            {
                return compareEndpoints(address, a1, a2);
            }
        });
    }
74920
public ArrayList<InetAddress> getLocalAddresses()
  {
    synchronized (_addressCache) {
      ArrayList<InetAddress> localAddresses = _addressCache.get("addresses");
      
      if (localAddresses == null) {
        localAddresses = new ArrayList<InetAddress>();
        
        try {
          for (NetworkInterfaceBase iface : getNetworkInterfaces()) {
            for (InetAddress addr : iface.getInetAddresses()) {
              localAddresses.add(addr);
            }
          }
          
          Collections.sort(localAddresses, new LocalIpCompare());
          
          _addressCache.put("addresses", localAddresses);
        } catch (Exception e) {
          log.log(Level.WARNING, e.toString(), e);
        } finally {
          _addressCache.put("addresses", localAddresses);
        }
      }
      
      return new ArrayList<>(localAddresses);
    }
  }
1086199
public static Address from(String address) {
    int lastColon = address.lastIndexOf(':');
    int openBracket = address.indexOf('[');
    int closeBracket = address.indexOf(']');

    String host;
    if (openBracket != -1 && closeBracket != -1) {
      host = address.substring(openBracket + 1, closeBracket);
    } else if (lastColon != -1) {
      host = address.substring(0, lastColon);
    } else {
      host = address;
    }

    int port;
    if (lastColon != -1) {
      try {
        port = Integer.parseInt(address.substring(lastColon + 1));
      } catch (NumberFormatException e) {
        throw new MalformedAddressException(address, e);
      }
    } else {
      port = DEFAULT_PORT;
    }
    return new Address(host, port);
  }
1207787
public Iterable<DUser> queryByCountry(java.lang.String country) {
    return queryByField(null, DUserMapper.Field.COUNTRY.getFieldName(), country);
  }
559722
public ManagementModelNode findNode(String address) {
        ManagementModelNode root = (ManagementModelNode)tree.getModel().getRoot();
        Enumeration<javax.swing.tree.TreeNode> allNodes = root.depthFirstEnumeration();
        while (allNodes.hasMoreElements()) {
            ManagementModelNode node = (ManagementModelNode)allNodes.nextElement();
            if (node.addressPath().equals(address)) return node;
        }

        return null;
    }
770862
public static List<String> parse(String address, String addresses) {
        List<String> result;
        // backwards compatibility - older clients only send a single address in the single address header and don't supply the multi-address header
        if (addresses == null || addresses.isEmpty()) {
            addresses = address;
        }
        if (addresses == null) {
            result = Collections.emptyList();
        }
        else {
            String[] parts = addresses.split(",");
            result = new ArrayList<String>(parts.length);
            for (String part : parts) {
                part = part.trim();
                if (NetworkAddress.isValidIPAddress(part)) {
                    result.add(part);
                }
            }
        }
        return result;
    }
53893
@Override
    public List<Address> lookupAddress(final List<String> typeId) throws IOException {

        final NominatimLookupRequest q = new NominatimLookupRequest();
        q.setQuery(typeId);
        return this.lookupAddress(q);
    }
450090
def getaddresses (addr):
    """"""
    parsed = [mail for name, mail in AddressList(addr).addresslist if mail]
    if parsed:
        addresses = parsed
    elif addr:
        # we could not parse any mail addresses, so try with the raw string
        addresses = [addr]
    else:
        addresses = []
    return addresses