Example usage for org.apache.http.util LangUtils equals

List of usage examples for org.apache.http.util LangUtils equals

Introduction

In this page you can find the example usage for org.apache.http.util LangUtils equals.

Prototype

public static boolean equals(Object[] objArr, Object[] objArr2) 

Source Link

Usage

From source file:org.mule.modules.valomnia.core.CustomNameValuePair.java

public boolean equals(final Object object) {
    if (this == object) {
        return true;
    }//from w ww  .  j  av  a2s . c o m
    if (object instanceof CustomNameValuePair) {
        CustomNameValuePair that = (CustomNameValuePair) object;
        return this.name.equals(that.name) && LangUtils.equals(this.value, that.value);
    } else {
        return false;
    }
}

From source file:com.gargoylesoftware.htmlunit.util.NameValuePair.java

/**
 * {@inheritDoc}//from  w  w  w  .  j ava2  s. c  o  m
 */
@Override
public boolean equals(final Object object) {
    if (!(object instanceof NameValuePair)) {
        return false;
    }
    final NameValuePair other = (NameValuePair) object;
    return LangUtils.equals(name_, other.name_) && LangUtils.equals(value_, other.value_);
}

From source file:com.ok2c.lightmtp.agent.SessionEndpoint.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*  ww w.ja  v  a 2  s .co m*/
    if (obj instanceof SessionEndpoint) {
        final SessionEndpoint that = (SessionEndpoint) obj;
        return LangUtils.equals(this.localAddress, that.localAddress)
                && LangUtils.equals(this.remoteAddress, that.remoteAddress);
    } else {
        return false;
    }
}

From source file:com.opengamma.util.tuple.IntObjectPair.java

@SuppressWarnings("unchecked")
@Override/*from www  .  j ava2  s .  c o m*/
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj instanceof IntObjectPair) {
        final IntObjectPair<T> other = (IntObjectPair<T>) obj;
        return this.first == other.first && LangUtils.equals(this.second, other.second);
    }
    return super.equals(obj);
}

From source file:com.opengamma.util.tuple.LongObjectPair.java

@SuppressWarnings("unchecked")
@Override//ww  w .j a v a2 s  .co  m
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj instanceof LongObjectPair) {
        final LongObjectPair<T> other = (LongObjectPair<T>) obj;
        return this.first == other.first && LangUtils.equals(this.second, other.second);
    }
    return super.equals(obj);
}

From source file:com.jayway.restassured.internal.http.BasicNameValuePairWithNoValueSupport.java

public boolean equals(final Object object) {
    if (this == object)
        return true;
    if (object instanceof NameValuePair) {
        BasicNameValuePairWithNoValueSupport that = (BasicNameValuePairWithNoValueSupport) object;
        return this.name.equals(that.name) && LangUtils.equals(this.value, that.value);
    } else {/*from  www .ja  v  a  2  s .  c o  m*/
        return false;
    }
}

From source file:com.grendelscan.commons.http.apache_overrides.serializable.SerializableNameValuePair.java

@Override
public boolean equals(final Object object) {
    if (object == null) {
        return false;
    }//  ww  w  .  j  a  v a  2  s  .  co m
    if (this == object) {
        return true;
    }
    if (object instanceof NameValuePair) {
        BasicNameValuePair that = (BasicNameValuePair) object;
        return name.equals(that.getName()) && LangUtils.equals(value, that.getValue());
    }
    return false;
}

From source file:cn.mimessage.and.sdk.net.request.DefaultValuePair.java

@Override
public boolean equals(final Object object) {
    if (object == null)
        return false;
    if (this == object)
        return true;
    if (object instanceof NameValuePair) {
        DefaultValuePair that = (DefaultValuePair) object;
        return this.name.equals(that.name) && LangUtils.equals(this.value, that.value);
    } else {//from  w w w  .  j  av a  2s . co  m
        return false;
    }
}

From source file:com.suning.boxcontroller.ui.logon.tool.SuningNameValuePair.java

@Override
public boolean equals(final Object object) {
    if (object == null)
        return false;
    if (this == object)
        return true;
    if (object instanceof NameValuePair) {
        SuningNameValuePair that = (SuningNameValuePair) object;
        return this.name.equals(that.name) && LangUtils.equals(this.value, that.value);
    } else {/*from   w  ww  .j a  v a 2 s .c  om*/
        return false;
    }
}

From source file:com.serphacker.serposcope.scraper.http.extensions.CloseableBasicHttpClientConnectionManager.java

synchronized HttpClientConnection getConnection(final HttpRoute route, final Object state) {
    Asserts.check(!this.isShutdown.get(), "Connection manager has been shut down");
    if (this.log.isDebugEnabled()) {
        this.log.debug("Get connection for route " + route);
    }/*from w  w w .  j a va2 s  .  com*/
    Asserts.check(!this.leased, "Connection is still allocated");
    if (!LangUtils.equals(this.route, route) || !LangUtils.equals(this.state, state)) {
        closeConnection();
    }
    this.route = route;
    this.state = state;
    checkExpiry();
    if (this.conn == null) {
        this.conn = this.connFactory.create(route, this.connConfig);
    }
    this.leased = true;
    return this.conn;
}