|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecta_vcard.android.content.ContentValues
public final class ContentValues
This class is used to store a set of values that the ContentResolver
can process.
Field Summary | |
---|---|
static java.lang.String |
TAG
|
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(java.lang.String key)
Returns true if this object has the named value. |
int |
describeContents()
|
boolean |
equals(java.lang.Object object)
|
java.lang.Object |
get(java.lang.String key)
Gets a value. |
java.lang.Boolean |
getAsBoolean(java.lang.String key)
Gets a value and converts it to a Boolean. |
java.lang.Byte |
getAsByte(java.lang.String key)
Gets a value and converts it to a Byte. |
byte[] |
getAsByteArray(java.lang.String key)
Gets a value that is a byte array. |
java.lang.Double |
getAsDouble(java.lang.String key)
Gets a value and converts it to a Double. |
java.lang.Float |
getAsFloat(java.lang.String key)
Gets a value and converts it to a Float. |
java.lang.Integer |
getAsInteger(java.lang.String key)
Gets a value and converts it to an Integer. |
java.lang.Long |
getAsLong(java.lang.String key)
Gets a value and converts it to a Long. |
java.lang.Short |
getAsShort(java.lang.String key)
Gets a value and converts it to a Short. |
java.lang.String |
getAsString(java.lang.String key)
Gets a value and converts it to a String. |
java.util.ArrayList<java.lang.String> |
getStringArrayList(java.lang.String key)
Deprecated. |
int |
hashCode()
|
void |
put(java.lang.String key,
java.lang.Boolean value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Byte value)
Adds a value to the set. |
void |
put(java.lang.String key,
byte[] value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Double value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Float value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Integer value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Long value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.Short value)
Adds a value to the set. |
void |
put(java.lang.String key,
java.lang.String value)
Adds a value to the set. |
void |
putAll(ContentValues other)
Adds all values from the passed in ContentValues. |
void |
putNull(java.lang.String key)
Adds a null value to the set. |
void |
putStringArrayList(java.lang.String key,
java.util.ArrayList<java.lang.String> value)
Deprecated. |
void |
remove(java.lang.String key)
Remove a single value. |
int |
size()
Returns the number of values. |
java.lang.String |
toString()
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
valueSet()
Returns a set of all of the keys and values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TAG
Constructor Detail |
---|
public ContentValues()
public ContentValues(int size)
size
- the initial size of the set of valuespublic ContentValues(ContentValues from)
from
- the values to copyMethod Detail |
---|
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void put(java.lang.String key, java.lang.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 copypublic void put(java.lang.String key, java.lang.Byte value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Short value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Integer value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Long value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Float value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Double value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, java.lang.Boolean value)
key
- the name of the value to putvalue
- the data for the value to putpublic void put(java.lang.String key, byte[] value)
key
- the name of the value to putvalue
- the data for the value to putpublic void putNull(java.lang.String key)
key
- the name of the value to make nullpublic int size()
public void remove(java.lang.String key)
key
- the name of the value to removepublic void clear()
public boolean containsKey(java.lang.String key)
key
- the value to check for
true
if the value is present, false
otherwisepublic java.lang.Object get(java.lang.String key)
String
, Boolean
, and
Number
implementations.
key
- the value to get
public java.lang.String getAsString(java.lang.String key)
key
- the value to get
public java.lang.Long getAsLong(java.lang.String key)
key
- the value to get
public java.lang.Integer getAsInteger(java.lang.String key)
key
- the value to get
public java.lang.Short getAsShort(java.lang.String key)
key
- the value to get
public java.lang.Byte getAsByte(java.lang.String key)
key
- the value to get
public java.lang.Double getAsDouble(java.lang.String key)
key
- the value to get
public java.lang.Float getAsFloat(java.lang.String key)
key
- the value to get
public java.lang.Boolean getAsBoolean(java.lang.String key)
key
- the value to get
public byte[] getAsByteArray(java.lang.String key)
key
- the value to get
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> valueSet()
public int describeContents()
@Deprecated public void putStringArrayList(java.lang.String key, java.util.ArrayList<java.lang.String> value)
@Deprecated public java.util.ArrayList<java.lang.String> getStringArrayList(java.lang.String key)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |