IT. Expert System.

Android Reference

ContentValues


android.content

Class ContentValues

    • Constructor Detail

      • ContentValues

        public ContentValues()
        Creates an empty set of values using the default initial size
      • ContentValues

        public ContentValues(int size)
        Creates an empty set of values using the given initial size
        Parameters:
        size - the initial size of the set of values
      • ContentValues

        public ContentValues(ContentValues from)
        Creates a set of values copied from the given set
        Parameters:
        from - the values to copy
    • Method Detail

      • equals

        public boolean equals(Object object)
        Description copied from class: Object
        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 reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.

        The default implementation returns true only if this == o. See Writing a correct equals method if you intend implementing your own equals method.

        The general contract for the equals and Object.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 neither of them.

        Overrides:
        equals in class Object
        Parameters:
        object - the object to compare this instance with.
        Returns:
        true if the specified object is equal to this Object; false otherwise.
        See Also:
        Object.hashCode()
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • put

        public void put(String key,
               String value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • putAll

        public void putAll(ContentValues other)
        Adds all values from the passed in ContentValues.
        Parameters:
        other - the ContentValues from which to copy
      • put

        public void put(String key,
               Byte value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Short value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Integer value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Long value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Float value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Double value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               Boolean value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • put

        public void put(String key,
               byte[] value)
        Adds a value to the set.
        Parameters:
        key - the name of the value to put
        value - the data for the value to put
      • putNull

        public void putNull(String key)
        Adds a null value to the set.
        Parameters:
        key - the name of the value to make null
      • size

        public int size()
        Returns the number of values.
        Returns:
        the number of values
      • remove

        public void remove(String key)
        Remove a single value.
        Parameters:
        key - the name of the value to remove
      • clear

        public void clear()
        Removes all values.
      • containsKey

        public boolean containsKey(String key)
        Returns true if this object has the named value.
        Parameters:
        key - the value to check for
        Returns:
        true if the value is present, false otherwise
      • get

        public Object get(String key)
        Gets a value. Valid value types are String, Boolean, and Number implementations.
        Parameters:
        key - the value to get
        Returns:
        the data for the value
      • getAsString

        public String getAsString(String key)
        Gets a value and converts it to a String.
        Parameters:
        key - the value to get
        Returns:
        the String for the value
      • getAsLong

        public Long getAsLong(String key)
        Gets a value and converts it to a Long.
        Parameters:
        key - the value to get
        Returns:
        the Long value, or null if the value is missing or cannot be converted
      • getAsInteger

        public Integer getAsInteger(String key)
        Gets a value and converts it to an Integer.
        Parameters:
        key - the value to get
        Returns:
        the Integer value, or null if the value is missing or cannot be converted
      • getAsShort

        public Short getAsShort(String key)
        Gets a value and converts it to a Short.
        Parameters:
        key - the value to get
        Returns:
        the Short value, or null if the value is missing or cannot be converted
      • getAsByte

        public Byte getAsByte(String key)
        Gets a value and converts it to a Byte.
        Parameters:
        key - the value to get
        Returns:
        the Byte value, or null if the value is missing or cannot be converted
      • getAsDouble

        public Double getAsDouble(String key)
        Gets a value and converts it to a Double.
        Parameters:
        key - the value to get
        Returns:
        the Double value, or null if the value is missing or cannot be converted
      • getAsFloat

        public Float getAsFloat(String key)
        Gets a value and converts it to a Float.
        Parameters:
        key - the value to get
        Returns:
        the Float value, or null if the value is missing or cannot be converted
      • getAsBoolean

        public Boolean getAsBoolean(String key)
        Gets a value and converts it to a Boolean.
        Parameters:
        key - the value to get
        Returns:
        the Boolean value, or null if the value is missing or cannot be converted
      • getAsByteArray

        public byte[] getAsByteArray(String key)
        Gets a value that is a byte array. Note that this method will not convert any other types to byte arrays.
        Parameters:
        key - the value to get
        Returns:
        the byte[] value, or null is the value is missing or not a byte[]
      • valueSet

        public Set<Map.Entry<String,Object>> valueSet()
        Returns a set of all of the keys and values
        Returns:
        a set of all of the keys and values
      • keySet

        public Set<String> keySet()
        Returns a set of all of the keys
        Returns:
        a set of all of the keys
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • putStringArrayList

        @Deprecated
        public void putStringArrayList(String key,
                                         ArrayList<String> value)
        Deprecated.
        Unsupported, here until we get proper bulk insert APIs.
      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this object.
        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3267 / . Delta: 0.03390 с