# GlanceNode

# GlanceNode

Artifact:[androidx.glance:glance-testing](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/testing/GlanceNode.kt+class:androidx.glance.testing.GlanceNode)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/glance#1.1.0)

<br />

```
abstract class GlanceNode<T : Any?>
```

<br />

Known direct subclasses  
[GlanceMappedNode](https://developer.android.com/reference/kotlin/androidx/glance/testing/unit/GlanceMappedNode)  

|------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GlanceMappedNode](https://developer.android.com/reference/kotlin/androidx/glance/testing/unit/GlanceMappedNode) | An implementation of[GlanceNode](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode)node that uses[MappedNode](https://developer.android.com/reference/kotlin/androidx/glance/testing/unit/MappedNode)to perform assertions during testing. |

*** ** * ** ***

A wrapper for Glance composable node under test.  

|                                       Parameters                                       |
|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| `<T : `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?>` | A representation of Glance composable node (e.g. MappedNode) on which assertions can be performed |

## Summary

|                                                                                             ### Public functions                                                                                             |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[GlanceNode](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode)`<T>>` | [children](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#children())`()` Returns children of current glance node.                                                                                         |
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                          | [equals](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                       |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                           | [hashCode](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#hashCode())`()`                                                                                                                                  |
| `abstract `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                 | [toDebugString](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#toDebugString())`()` Returns the Glance node as string that can be presented in error messages helping developer debug the assertion error. |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                     | [toString](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#toString())`()`                                                                                                                                  |

| ### Public properties |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `T`                   | [value](https://developer.android.com/reference/kotlin/androidx/glance/testing/GlanceNode#value()) an object of the representation of the Glance composable node |

## Public functions

### children

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/glance#1.1.0)  

```
abstract fun children(): List<GlanceNode<T>>
```

Returns children of current glance node.  

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```  

### toDebugString

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/glance#1.1.0)  

```
abstract fun toDebugString(): String
```

Returns the Glance node as string that can be presented in error messages helping developer debug the assertion error.  

### toString

```
open fun toString(): String
```  

## Public properties

### value

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/glance#1.1.0)  

```
val value: T
```

an object of the representation of the Glance composable node