override equals method for SIPDialog
"Jens Tinfors" <[email protected]> Sun, 14 Oct 2007 19:40:55 +0200
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
--===============9178951922798540067==
Content-Type: multipart/alternative;
boundary="----=_Part_17369_18768049.1192383655900"
------=_Part_17369_18768049.1192383655900
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
Im overriding the boolean equals(Object o) method in SIPDialog in order to
be able to better compare Dialog objects..
Perhaps that is something you'd like to add to the cvs?
public boolean equals(Object obj) {
if (!obj.getClass().equals(this.getClass())) {
return false;
}
if(obj != null && this.getDialogId() != null && !
this.getDialogId().equals("")) {
return this.getDialogId
().equals(((Dialog)obj).getDialogId());
} else {
return true;
}
}
regards/jns =)
------=_Part_17369_18768049.1192383655900
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,<br><br>Im overriding the boolean equals(Object o) method in SIPDialog in order to be able to better compare Dialog objects..<br>Perhaps that is something you'd like to add to the cvs?<br><br> public boolean equals(Object obj) {
<br> if (!obj.getClass().equals(this.getClass())) {<br> return false;<br> }<br> if(obj != null && this.getDialogId() != null && ! this.getDialogId().equals("")) {
<br> return this.getDialogId().equals(((Dialog)obj).getDialogId());<br> } else {<br> return true;<br> }<br> }<br><br>regards/jns =)<br>
------=_Part_17369_18768049.1192383655900--
--===============9178951922798540067==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
nist-sip mailing list
[email protected]
http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
--===============9178951922798540067==--