|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.ContentValues
public final class ContentValues
This class is used to store a set of values that the ContentResolver
can process.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
Parcelable.Creator<T> |
| Field Summary | |
|---|---|
static Parcelable.Creator<ContentValues> |
CREATOR
|
static String |
TAG
|
| Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
| Constructor Summary | |
|---|---|
ContentValues()
Creates an empty set of values using the default initial size |
|
ContentValues(ContentValues from)
Creates a set of values copied from the given set |
|
ContentValues(int size)
Creates an empty set of values using the given initial size |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all values. |
boolean |
containsKey(String key)
Returns true if this object has the named value. |
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation. |
boolean |
equals(Object object)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
Object |
get(String key)
Gets a value. |
Boolean |
getAsBoolean(String key)
Gets a value and converts it to a Boolean. |
Byte |
getAsByte(String key)
Gets a value and converts it to a Byte. |
byte[] |
getAsByteArray(String key)
Gets a value that is a byte array. |
Double |
getAsDouble(String key)
Gets a value and converts it to a Double. |
Float |
getAsFloat(String key)
Gets a value and converts it to a Float. |
Integer |
getAsInteger(String key)
Gets a value and converts it to an Integer. |
Long |
getAsLong(String key)
Gets a value and converts it to a Long. |
Short |
getAsShort(String key)
Gets a value and converts it to a Short. |
String |
getAsString(String key)
Gets a value and converts it to a String. |
ArrayList<String> |
getStringArrayList(String key)
Deprecated. |
int |
hashCode()
Returns an integer hash code for the receiver. |
void |
put(String key,
Boolean value)
Adds a value to the set. |
void |
put(String key,
Byte value)
Adds a value to the set. |
void |
put(String key,
byte[] value)
Adds a value to the set. |
void |
put(String key,
Double value)
Adds a value to the set. |
void |
put(String key,
Float value)
Adds a value to the set. |
void |
put(String key,
Integer value)
Adds a value to the set. |
void |
put(String key,
Long value)
Adds a value to the set. |
void |
put(String key,
Short value)
Adds a value to the set. |
void |
put(String key,
String value)
Adds a value to the set. |
void |
putAll(ContentValues other)
Adds all values from the passed in ContentValues. |
void |
putNull(String key)
Adds a null value to the set. |
void |
putStringArrayList(String key,
ArrayList<String> value)
Deprecated. |
void |
remove(String key)
Remove a single value. |
int |
size()
Returns the number of values. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
Set<Map.Entry<String,Object>> |
valueSet()
Returns a set of all of the keys and values |
void |
writeToParcel(Parcel parcel,
int flags)
Flatten this object in to a Parcel. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG
public static final Parcelable.Creator<ContentValues> CREATOR
| Constructor Detail |
|---|
public ContentValues()
public ContentValues(int size)
size - the initial size of the set of valuespublic ContentValues(ContentValues from)
from - the values to copy| Method Detail |
|---|
public boolean equals(Object object)
Object
equals in class Objectobject - Object the object to compare with this object.
true if the object is the same as this
object false if it is different from this object.Object.hashCode()public int hashCode()
Objecttrue when passed to .equals must
answer the same value for this method.
hashCode in class ObjectObject.equals(java.lang.Object)
public void put(String key,
String value)
key - the name of the value to putvalue - the data for the value to putpublic void putAll(ContentValues other)
other - the ContentValues from which to copy
public void put(String key,
Byte value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Short value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Integer value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Long value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Float value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Double value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
Boolean value)
key - the name of the value to putvalue - the data for the value to put
public void put(String key,
byte[] value)
key - the name of the value to putvalue - the data for the value to putpublic void putNull(String key)
key - the name of the value to make nullpublic int size()
public void remove(String key)
key - the name of the value to removepublic void clear()
public boolean containsKey(String key)
key - the value to check for
true if the value is present, false otherwisepublic Object get(String key)
String, Boolean, and
Number implementations.
key - the value to get
public String getAsString(String key)
key - the value to get
public Long getAsLong(String key)
key - the value to get
public Integer getAsInteger(String key)
key - the value to get
public Short getAsShort(String key)
key - the value to get
public Byte getAsByte(String key)
key - the value to get
public Double getAsDouble(String key)
key - the value to get
public Float getAsFloat(String key)
key - the value to get
public Boolean getAsBoolean(String key)
key - the value to get
public byte[] getAsByteArray(String key)
key - the value to get
public Set<Map.Entry<String,Object>> valueSet()
public int describeContents()
Parcelable
describeContents in interface Parcelable
public void writeToParcel(Parcel parcel,
int flags)
Parcelable
writeToParcel in interface Parcelableparcel - The Parcel in which the object should be written.flags - Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
@Deprecated
public void putStringArrayList(String key,
ArrayList<String> value)
@Deprecated public ArrayList<String> getStringArrayList(String key)
public String toString()
Object
toString in class Object
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||