FileDocCategorySizeDatePackage
Account.javaAPI DocAndroid 5.1 API2574Thu Mar 12 22:22:08 GMT 2015android.accounts

Account

public class Account extends Object implements android.os.Parcelable
Value type that represents an Account in the {@link AccountManager}. This object is {@link Parcelable} and also overrides {@link #equals} and {@link #hashCode}, making it suitable for use as the key of a {@link java.util.Map}

Fields Summary
public final String
name
public final String
type
public static final Creator
CREATOR
Constructors Summary
public Account(String name, String type)

        if (TextUtils.isEmpty(name)) {
            throw new IllegalArgumentException("the name must not be empty: " + name);
        }
        if (TextUtils.isEmpty(type)) {
            throw new IllegalArgumentException("the type must not be empty: " + type);
        }
        this.name = name;
        this.type = type;
    
public Account(android.os.Parcel in)

        this.name = in.readString();
        this.type = in.readString();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object o)

        if (o == this) return true;
        if (!(o instanceof Account)) return false;
        final Account other = (Account)o;
        return name.equals(other.name) && type.equals(other.type);
    
public inthashCode()

        int result = 17;
        result = 31 * result + name.hashCode();
        result = 31 * result + type.hashCode();
        return result;
    
public java.lang.StringtoString()


       
        return "Account {name=" + name + ", type=" + type + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeString(name);
        dest.writeString(type);