Code example for NetworkInterface

Methods: getName

0
     *          equals <code>networkInterface</code>'s {@link NetworkInterface#getName() name}. 
     */ 
    @Override 
    protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException {
 
        if( name.equals(networkInterface.getName()) )
            return address;
        return null; 
    } 
 
    @Override 
    public int hashCode() { 
        return name.hashCode();
    } 
 
    @Override 
    public boolean equals(Object o) {
        return (o instanceof NicInterfaceCriteria)
                && name.equals(((NicInterfaceCriteria)o).name);
    }