Code example for NetworkInterface

Methods: getName

0
     *          matches <code>networkInterface</code>'s {@link NetworkInterface#getName() name}. 
     */ 
    @Override 
    protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException {
 
        if( pattern.matcher(networkInterface.getName()).matches() )
            return address;
        return null; 
    } 
 
    @Override 
    public int hashCode() { 
        return pattern.toString().hashCode();
    } 
 
    @Override 
    public boolean equals(Object o) {
        return (o instanceof NicMatchInterfaceCriteria)
                && pattern.toString().equals(((NicMatchInterfaceCriteria)o).pattern.toString());
    } 
Connect your IDE to all the code out there  Get Codota for Java