public boolean isEquivalent()

in modules/kernel/src/org/apache/axis2/client/Options.java [1371:1524]


    public boolean isEquivalent(Options obj) {
        // NOTE: the input object is expected to exist (ie, be non-null)

        if (this.timeOutInMilliSeconds != obj.getTimeOutInMilliSeconds()) {
            return false;
        }

        if (this.isExceptionToBeThrownOnSOAPFault.booleanValue() !=
                obj.isExceptionToBeThrownOnSOAPFault()) {
            return false;
        }

        if (this.useSeparateListener.booleanValue() != obj.isUseSeparateListener()) {
            return false;
        }

        if (this.manageSession != obj.isManageSession()) {
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.soapVersionURI != null) && (obj.getSoapVersionURI() != null)) {
            if (!this.soapVersionURI.equals(obj.getSoapVersionURI())) {
                return false;
            }
        } else if ((this.soapVersionURI == null) && (obj.getSoapVersionURI() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.action != null) && (obj.getAction() != null)) {
            if (!this.action.equals(obj.getAction())) {
                return false;
            }
        } else if ((this.action == null) && (obj.getAction() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.transportInProtocol != null) && (obj.getTransportInProtocol() != null)) {
            if (!this.transportInProtocol.equals(obj.getTransportInProtocol())) {
                return false;
            }
        } else if ((this.transportInProtocol == null) && (obj.getTransportInProtocol() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.messageId != null) && (obj.getMessageId() != null)) {
            if (!this.messageId.equals(obj.getMessageId())) {
                return false;
            }
        } else if ((this.messageId == null) && (obj.getMessageId() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.faultTo != null) && (obj.getFaultTo() != null)) {
            if (!this.faultTo.isEquivalent(obj.getFaultTo())) {
                return false;
            }
        } else if ((this.faultTo == null) && (obj.getFaultTo() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.from != null) && (obj.getFrom() != null)) {
            if (!this.from.isEquivalent(obj.getFrom())) {
                return false;
            }
        } else if ((this.from == null) && (obj.getFrom() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.replyTo != null) && (obj.getReplyTo() != null)) {
            if (!this.replyTo.isEquivalent(obj.getReplyTo())) {
                return false;
            }
        } else if ((this.replyTo == null) && (obj.getReplyTo() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.to != null) && (obj.getTo() != null)) {
            if (!this.to.isEquivalent(obj.getTo())) {
                return false;
            }
        } else if ((this.to == null) && (obj.getTo() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        if ((this.properties != null) && (obj.getProperties() != null)) {
            if (!this.properties.equals(obj.getProperties())) {
                // This is a strict test.
                // Returns true if the given object is also a map
                // and the two maps represent the same mappings.
                return false;
            }
        } else if ((this.properties == null) && (obj.getProperties() == null)) {
            // continue
        } else {
            // mismatch
            return false;
        }

        // --------------------------------------------------------------------

        // TODO: consider checking the following objects for equivalency
        //        List relationships;
        //        ArrayList referenceParameters;
        //        TransportListener listener;
        //        TransportInDescription transportIn;
        //        TransportOutDescription transportOut;

        // TODO: consider checking the parent objects for equivalency


        return true;
    }