/*******************************************************************************
* Copyright 2015 htd0324@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.laudandjolynn.mytv.model;
/**
* @author: Laud
* @email: htd0324@gmail.com
* @date: 2015年4月28日 下午5:13:40
* @copyright: www.laudandjolynn.com
*/
public class Proxy {
private String ip;
private int port;
private String anonymous;
private boolean sock;
private String pos;
private int speed;
private String lastCheck;
public Proxy(String ip, int port) {
super();
this.ip = ip;
this.port = port;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public String getAnonymous() {
return anonymous;
}
public void setAnonymous(String anonymous) {
this.anonymous = anonymous;
}
public boolean isSock() {
return sock;
}
public void setSock(boolean sock) {
this.sock = sock;
}
public String getPos() {
return pos;
}
public void setPos(String pos) {
this.pos = pos;
}
public int getSpeed() {
return speed;
}
public void setSpeed(int speed) {
this.speed = speed;
}
public String getLastCheck() {
return lastCheck;
}
public void setLastCheck(String lastCheck) {
this.lastCheck = lastCheck;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((ip == null) ? 0 : ip.hashCode());
result = prime * result + port;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Proxy other = (Proxy) obj;
if (ip == null) {
if (other.ip != null)
return false;
} else if (!ip.equals(other.ip))
return false;
if (port != other.port)
return false;
return true;
}
@Override
public String toString() {
return "Proxy [ip=" + ip + ", port=" + port + ", anonymous="
+ anonymous + ", sock=" + sock + "]";
}
}