public class

SyncAdapterType

extends Object
implements Parcelable
java.lang.Object
   ↳ android.content.SyncAdapterType

Class Overview

Value type that represents a SyncAdapterType. This object overrides equals(Object) and hashCode(), making it suitable for use as the key of a Map

Summary

Constants
Creator<SyncAdapterType> CREATOR
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public final String accountType
public final String authority
public final boolean isKey
Public Constructors
SyncAdapterType(String authority, String accountType, boolean userVisible, boolean supportsUploading)
SyncAdapterType(Parcel source)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
boolean equals(Object o)
Compares this instance with the specified object and indicates if they are equal.
int hashCode()
Returns an integer hash code for this object.
boolean isUserVisible()
static SyncAdapterType newKey(String authority, String accountType)
boolean supportsUploading()
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final Creator<SyncAdapterType> CREATOR

Since: API Level 5

Fields

public final String accountType

Since: API Level 5

public final String authority

Since: API Level 5

public final boolean isKey

Since: API Level 5

Public Constructors

public SyncAdapterType (String authority, String accountType, boolean userVisible, boolean supportsUploading)

Since: API Level 5

public SyncAdapterType (Parcel source)

Since: API Level 5

Public Methods

public int describeContents ()

Since: API Level 5

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public boolean equals (Object o)

Since: API Level 5

Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be both transitive and reflexive.

The implementation in Object returns true only if o is the exact same object as the receiver (using the == operator for comparison). Subclasses often implement equals(Object) so that it takes into account the two object's types and states.

The general contract for the equals(Object) and hashCode() methods is that if equals returns true for any two objects, then hashCode() must return the same value for these objects. This means that subclasses of Object usually override either both methods or none of them.

Parameters
o the object to compare this instance with.
Returns
  • true if the specified object is equal to this Object; false otherwise.

public int hashCode ()

Since: API Level 5

Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Returns
  • this object's hash code.

public boolean isUserVisible ()

Since: API Level 5

public static SyncAdapterType newKey (String authority, String accountType)

Since: API Level 5

public boolean supportsUploading ()

Since: API Level 5

public String toString ()

Since: API Level 5

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's hashCode(), that is, it is equivalent to the following expression:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int flags)

Since: API Level 5

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.