/**
*
*/
-public class Configuration implements IConfiguration {
+public class Configuration implements IConfiguration, Comparable {
private static final String MEMENTO_ID = "id";
private static final String MEMENTO_NAME = "name";
fPassword = "";
}
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(fName);
+ buffer.append(" - ");
+ buffer.append(fUser);
+ buffer.append(" - ");
+ buffer.append(fUrl);
+ buffer.append(" - ");
+ buffer.append(fType);
+ return buffer.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object o) {
+ if (o instanceof IConfiguration) {
+ return fName.compareTo(((IConfiguration)o).getName());
+ }
+ return 1;
+ }
}
\ No newline at end of file