org.apache.commons.httpclient.protocol.Protocol.equals()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.apache.commons.httpclient.protocol.Protocol.equals()方法的一些代码示例,展示了Protocol.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.equals()方法的具体详情如下:
包路径:org.apache.commons.httpclient.protocol.Protocol
类名称:Protocol
方法名:equals

Protocol.equals介绍

[英]Return true if the specified object equals this object.
[中]如果指定的对象等于此对象,则返回true。

代码示例

代码示例来源:origin: elastic/elasticsearch-hadoop

public boolean equals(Object obj) {
  return (obj instanceof DelegatedProtocol ? true : original.equals(obj));
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object o) {
  
  if (o instanceof HttpHost) {
    // shortcut if we're comparing with ourselves
    if (o == this) { 
      return true;
    }
    HttpHost that = (HttpHost) o;
    if (!this.hostname.equalsIgnoreCase(that.hostname)) {
      return false;
    }
    if (this.port != that.port) {
      return false;
    }
    if (!this.protocol.equals(that.protocol)) {
      return false;
    }
    // everything matches
    return true;
  } else {
    return false;
  }
}

代码示例来源:origin: commons-httpclient/commons-httpclient

return false;
if (!this.host.getProtocol().equals(connection.getProtocol())) {
  return false;

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

public boolean equals(Object obj) {
  return (obj instanceof DelegatedProtocol ? true : original.equals(obj));
}

代码示例来源:origin: org.elasticsearch/elasticsearch-spark

public boolean equals(Object obj) {
  return (obj instanceof DelegatedProtocol ? true : original.equals(obj));
}

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr

public boolean equals(Object obj) {
  return (obj instanceof DelegatedProtocol ? true : original.equals(obj));
}

代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13

public boolean equals(Object obj) {
  return (obj instanceof DelegatedProtocol ? true : original.equals(obj));
}

代码示例来源:origin: org.apache.commons/httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object o) {
  
  if (o instanceof HttpHost) {
    // shortcut if we're comparing with ourselves
    if (o == this) { 
      return true;
    }
    HttpHost that = (HttpHost) o;
    if (!this.hostname.equalsIgnoreCase(that.hostname)) {
      return false;
    }
    if (this.port != that.port) {
      return false;
    }
    if (!this.protocol.equals(that.protocol)) {
      return false;
    }
    // everything matches
    return true;
  } else {
    return false;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object o) {
  
  if (o instanceof HttpHost) {
    // shortcut if we're comparing with ourselves
    if (o == this) { 
      return true;
    }
    HttpHost that = (HttpHost) o;
    if (!this.hostname.equalsIgnoreCase(that.hostname)) {
      return false;
    }
    if (this.port != that.port) {
      return false;
    }
    if (!this.protocol.equals(that.protocol)) {
      return false;
    }
    // everything matches
    return true;
  } else {
    return false;
  }
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object o) {
  
  if (o instanceof HttpHost) {
    // shortcut if we're comparing with ourselves
    if (o == this) { 
      return true;
    }
    HttpHost that = (HttpHost) o;
    if (!this.hostname.equalsIgnoreCase(that.hostname)) {
      return false;
    }
    if (this.port != that.port) {
      return false;
    }
    if (!this.protocol.equals(that.protocol)) {
      return false;
    }
    // everything matches
    return true;
  } else {
    return false;
  }
}

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object o) {
  
  if (o instanceof HttpHost) {
    // shortcut if we're comparing with ourselves
    if (o == this) { 
      return true;
    }
    HttpHost that = (HttpHost) o;
    if (!this.hostname.equalsIgnoreCase(that.hostname)) {
      return false;
    }
    if (this.port != that.port) {
      return false;
    }
    if (!this.protocol.equals(that.protocol)) {
      return false;
    }
    // everything matches
    return true;
  } else {
    return false;
  }
}

代码示例来源:origin: org.apache.commons/httpclient

return false;
if (!this.host.getProtocol().equals(connection.getProtocol())) {
  return false;

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

return false;
if (!this.host.getProtocol().equals(connection.getProtocol())) {
  return false;

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

return false;
if (!this.host.getProtocol().equals(connection.getProtocol())) {
  return false;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

return false;
if (!this.host.getProtocol().equals(connection.getProtocol())) {
  return false;

相关文章