Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/reply
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18184/src/java/net/sf/asterisk/fastagi/reply
Modified Files:
AGIReply.java
Log Message:
Added toString(), hashCode() and equals()
Index: AGIReply.java
===================================================================
RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/reply/AGIReply.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -p -r1.8 -r1.9
--- AGIReply.java 9 Mar 2005 23:45:23 -0000 1.8
+++ AGIReply.java 10 Mar 2005 13:54:06 -0000 1.9
@@ -18,6 +18,11 @@ package net.sf.asterisk.fastagi.reply;
import java.io.Serializable;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
/**
* Reply received in response to an AGICommand.<br>
* The AGIReply contains information about success or failure of the execution
@@ -142,7 +147,7 @@ public class AGIReply implements Seriali
* syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX).
*
* @return the synopsis of the command sent, <code>null</code> if there
- * were no syntax errors.
+ * were no syntax errors.
*/
public String getSynopsis()
{
@@ -164,7 +169,7 @@ public class AGIReply implements Seriali
* syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX).
*
* @return the usage of the command sent, <code>null</code> if there were
- * no syntax errors.
+ * no syntax errors.
*/
public String getUsage()
{
@@ -180,4 +185,20 @@ public class AGIReply implements Seriali
{
this.usage = usage;
}
+
+ public String toString()
+ {
+ return ToStringBuilder.reflectionToString(this,
+ ToStringStyle.MULTI_LINE_STYLE);
+ }
+
+ public boolean equals(Object o)
+ {
+ return EqualsBuilder.reflectionEquals(this, o);
+ }
+
+ public int hashCode()
+ {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
}
|