1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

SMACK-361 Added support for Entity Capabilities.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13560 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Florian Schmaus 2013-03-18 08:50:48 +00:00 committed by flow
parent 1cdb86989a
commit 21be8c55ee
33 changed files with 2395 additions and 88 deletions

View file

@ -299,6 +299,26 @@ public class FormField {
return buf.toString();
}
public boolean equals(Object obj) {
if (obj == null)
return false;
if (obj == this)
return true;
if (obj.getClass() != getClass())
return false;
FormField other = (FormField) obj;
String thisXml = toXML();
String otherXml = other.toXML();
if (thisXml.equals(otherXml)) {
return true;
} else {
return false;
}
}
/**
* Represents the available option of a given FormField.
*
@ -354,5 +374,27 @@ public class FormField {
buf.append("</option>");
return buf.toString();
}
public boolean equals(Object obj) {
if (obj == null)
return false;
if (obj == this)
return true;
if (obj.getClass() != getClass())
return false;
Option other = (Option) obj;
if (!value.equals(other.value))
return false;
String thisLabel = label == null ? "" : label;
String otherLabel = other.label == null ? "" : other.label;
if (!thisLabel.equals(otherLabel))
return false;
return true;
}
}
}