2/15/26, 8:49 PM Entity | API reference | Android Developers
Entity Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
Kotlin (/reference/kotlin/android/content/Entity) | Java
public final class Entity
extends Object (/reference/java/lang/Object)
[Link] (/reference/java/lang/Object)
↳ [Link]
A representation of a item using ContentValues. It contains one top level ContentValue
plus a collection of Uri, ContentValues tuples as subvalues. One example of its use is in
Contacts, where the top level ContentValue contains the columns from the RawContacts
table and the subvalues contain a ContentValues object for each row from the Data table
that corresponds to that RawContact. The uri refers to the Data table uri for each row.
Summary
Nested classes
class [Link]
(/reference/android/content/[Link])
Public constructors
Entity (/reference/android/content/Entity#Entity([Link]))(ContentValues
(/reference/android/content/ContentValues) values)
[Link] 1/6
2/15/26, 8:49 PM Entity | API reference | Android Developers
Public methods
void addSubValue
(/reference/android/content/Entity#addSubVa
(Uri (/reference/android/net/Uri) uri, Con
(/reference/android/content/ContentValues)
ContentValues getEntityValues (/reference/android/conte
(/reference/android/content/ContentValues)
ArrayList (/reference/java/util/ArrayList) getSubValues (/reference/android/content/E
<[Link]
(/reference/android/content/[Link])
>
String (/reference/java/lang/String) toString (/reference/android/content/Entity
Returns a string representation of the object.
Inherited methods
From class [Link] (/reference/java/lang/Object)
Object (/reference/java/lang/Object) clone (/reference/java/lang/Object#clone())()
Creates and returns a copy of this object.
boolean equals
(/reference/java/lang/Object#equals([Link]
(Object (/reference/java/lang/Object) obj)
Indicates whether some other object is "equal to" this
one.
void finalize (/reference/java/lang/Object#finalize())()
Called by the garbage collector on an object when
garbage collection determines that there are no more
references to the object.
final Class (/reference/java/lang/Class)<?> getClass (/reference/java/lang/Object#getClass())()
[Link] 2/6
2/15/26, 8:49 PM Entity | API reference | Android Developers
Returns the runtime class of this Object .
int hashCode (/reference/java/lang/Object#hashCode())
()
Returns a hash code value for the object.
final void notify (/reference/java/lang/Object#notify())()
Wakes up a single thread that is waiting on this
object's monitor.
final void notifyAll (/reference/java/lang/Object#notifyAll())
()
Wakes up all threads that are waiting on this object's
monitor.
String (/reference/java/lang/String) toString (/reference/java/lang/Object#toString())()
Returns a string representation of the object.
final void wait (/reference/java/lang/Object#wait(long,%20int))
(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened,
typically by being notified or interrupted, or until a
certain amount of real time has elapsed.
final void wait (/reference/java/lang/Object#wait(long))(long
timeoutMillis)
Causes the current thread to wait until it is awakened,
typically by being notified or interrupted, or until a
certain amount of real time has elapsed.
final void wait (/reference/java/lang/Object#wait())()
Causes the current thread to wait until it is awakened,
typically by being notified or interrupted.
Public constructors
[Link] 3/6
2/15/26, 8:49 PM Entity | API reference | Android Developers
Entity Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public Entity (ContentValues (/reference/android/content/ContentValues) values)
Parameters
values ContentValues
Public methods
addSubValue Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public void addSubValue (Uri (/reference/android/net/Uri) uri,
ContentValues (/reference/android/content/ContentValues) values)
Parameters
uri Uri
values ContentValues
getEntityValues Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
[Link] 4/6
2/15/26, 8:49 PM Entity | API reference | Android Developers
public ContentValues (/reference/android/content/ContentValues) getEntityValues ()
Returns
ContentValues
(/reference/android/content/ContentValues)
getSubValues Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public ArrayList (/reference/java/util/ArrayList)<[Link] (/reference/andr
Returns
ArrayList (/reference/java/util/ArrayList)
<[Link]
(/reference/android/content/[Link])
>
toString Added in API level 8 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public String (/reference/java/lang/String) toString ()
Returns a string representation of the object.
Returns
[Link] 5/6
2/15/26, 8:49 PM Entity | API reference | Android Developers
String a string representation of the object.
(/reference/java/lang/String)
Content and code samples on this page are subject to the licenses described in the Content License
(/license). Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[Link] 6/6