Back to project page AccountPasswordsAndroid.
The source code is released under:
GNU General Public License
If you think the Android project AccountPasswordsAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ving.accountpasswords; /*from w w w .j ava 2s .co m*/ import java.util.regex.PatternSyntaxException; public class PasswordData implements Comparable<PasswordData> { private String account; private String userId; private String password; public PasswordData (String newAccount, String newUserId, String newPassword) { account = newAccount; userId = newUserId; password = newPassword; } public PasswordData (String input) { try { String[] fields = input.split("\\|"); account = fields[0]; userId = fields[1]; password = fields[2]; } catch (PatternSyntaxException ex) { account = ""; userId = ""; password = ""; } } public int compareTo (PasswordData pwd) { int rtn = this.account.toLowerCase().compareTo(pwd.account.toLowerCase()); return rtn; } public String getAccount() { return account; } public String getUserId() { return userId; } public String getPassword() { return password; } public void update(String newAccount, String newUserId, String newPassword) { account = newAccount; userId = newUserId; password = newPassword; } }