xproxyserver.java

来自「java写的浏览器」· Java 代码 · 共 68 行

JAVA
68
字号
/****************************************************************
*              XBrowser  -  eXtended web Browser                *
*                                                               *
*           Copyright (c) 2000-2001  Armond Avanes              *
*     Refer to ReadMe & License files for more information      *
*                                                               *
*                                                               *
*                      By: Armond Avanes                        *
*       Armond555@yahoo.com     &    Armond333@yahoo.com        *
*                http://xbrowser.sourceforge.net/               *
*****************************************************************/
package xbrowser.util;

public final class XProxyServer
{
	public XProxyServer()
	{
		useProxy = false;
		proxyAddress = "";
		proxyPort = "";
	}

	public boolean getUseProxy()
    {
    	return useProxy;
    }

	public void setUseProxy(boolean use)
    {
    	useProxy = use;
    }

	public String getProxyAddress()
    {
    	return proxyAddress;
    }

	public void setProxyAddress(String address)
    {
    	proxyAddress = address.trim();
    }

	public String getProxyPort()
    {
    	return proxyPort;
    }

	public void setProxyPort(String port)
    {
    	proxyPort = port.trim();
    }

	public boolean equals(Object obj)
	{
		if( !(obj instanceof XProxyServer) )
			return false;

	XProxyServer proxy = (XProxyServer)obj;

		return( useProxy==proxy.getUseProxy() && proxyAddress.equals(proxy.getProxyAddress()) && proxyPort.equals(proxy.getProxyPort()) );
	}

// Attributes:
    private boolean useProxy;
    private String proxyAddress;
    private String proxyPort;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?