# CLObject

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/parser/CLObject.java+class:androidx.constraintlayout.core.parser.CLObject) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
public class CLObject extends CLContainer implements Iterable<CLKey>
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.constraintlayout.core.parser.CLElement](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement) |||
|   | ↳ | [androidx.constraintlayout.core.parser.CLContainer](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer) ||
|   |   | ↳ | [androidx.constraintlayout.core.parser.CLObject](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject) |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#CLObject(char[])(char[] content)` |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#allocate(char[])(char[] content)` Allocate a CLObject around an array of chars |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#clone()()` |
| `https://developer.android.com/reference/java/util/Iterator.html<https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLKey>` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#iterator()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#toFormattedJSON()()` Returns a object as a formatted JSON5 String |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#toFormattedJSON(int,int)(int indent, int forceIndent)` Returns as a formatted JSON5 String with an indentation |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject#toJSON()()` Returns objet as a JSON5 String |

### Inherited fields

From [androidx.constraintlayout.core.parser.CLElement](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement) `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#mContainer()` `long` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#mEnd()` `long` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#mStart()` `static int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#sBaseIndent()` `static int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#sMaxLine()`

### Inherited methods

From [androidx.constraintlayout.core.parser.CLContainer](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer) `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#add(androidx.constraintlayout.core.parser.CLElement)(https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement element)` `static https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#allocate(char[])(char[] content)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#clear()()` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#get(int)(int index)`

//////////////////////////////////////////////////////////////////////
`https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#get(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)`

//////////////////////////////////////////////////////////////////////
`https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLArray` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getArray(int)(int index)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLArray` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getArray(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLArray` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getArrayOrCreate(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLArray` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getArrayOrNull(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getBoolean(int)(int index)` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getBoolean(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `float` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getFloat(int)(int index)` `float` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getFloat(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `float` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getFloatOrNaN(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getInt(int)(int index)` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getInt(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getObject(int)(int index)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getObject(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLObject` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getObjectOrNull(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getOrNull(int)(int index)`

//////////////////////////////////////////////////////////////////////
`https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getOrNull(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)`

//////////////////////////////////////////////////////////////////////
`https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getString(int)(int index)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getString(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getStringOrNull(int)(int index)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#getStringOrNull(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#has(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#hashCode()()` `https://developer.android.com/reference/java/util/ArrayList.html<https://developer.android.com/reference/java/lang/String.html>` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#names()()` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#put(java.lang.String,androidx.constraintlayout.core.parser.CLElement)(https://developer.android.com/reference/java/lang/String.html name, https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement value)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#putNumber(java.lang.String,float)(https://developer.android.com/reference/java/lang/String.html name, float value)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#putString(java.lang.String,java.lang.String)(https://developer.android.com/reference/java/lang/String.html name, https://developer.android.com/reference/java/lang/String.html value)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#remove(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#size()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer#toString()()` From [androidx.constraintlayout.core.parser.CLElement](https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement) `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#addIndent(java.lang.StringBuilder,int)(https://developer.android.com/reference/java/lang/StringBuilder.html builder, int indent)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#clone()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#content()()` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getContainer()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getDebugName()()` `long` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getEnd()()`

The character index this element was ended on
`float` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getFloat()()` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getInt()()` `int` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getLine()()`

get the line Number
`long` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getStart()()`

The character index this element was started on
`https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#getStrClass()()` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#hasContent()()`

Whether this element has any valid content defined.
`boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#isDone()()` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#isStarted()()` `boolean` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#notStarted()()` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#setContainer(androidx.constraintlayout.core.parser.CLContainer)(https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLContainer element)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#setEnd(long)(long end)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#setLine(int)(int line)` `void` `https://developer.android.com/reference/androidx/constraintlayout/core/parser/CLElement#setStart(long)(long start)` From [java.lang.Iterable](https://developer.android.com/reference/java/lang/Iterable.html) `void` `https://developer.android.com/reference/java/lang/Iterable.html#forEach(java.util.function.Consumer&lt;? super T&gt;)(https://developer.android.com/reference/java/util/function/Consumer.html<T> action)` `https://developer.android.com/reference/java/util/Spliterator.html<T>` `https://developer.android.com/reference/java/lang/Iterable.html#spliterator()()`

## Public constructors

### CLObject

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

```
public CLObject(char[] content)
```

## Public methods

### allocate

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

```
public static CLObject allocate(char[] content)
```

Allocate a CLObject around an array of chars

### clone

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

```
public @NonNull CLObject clone()
```

### iterator

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

```
public Iterator<CLKey> iterator()
```

### toFormattedJSON

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

```
public String toFormattedJSON()
```

Returns a object as a formatted JSON5 String

### toFormattedJSON

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

```
public String toFormattedJSON(int indent, int forceIndent)
```

Returns as a formatted JSON5 String with an indentation

### toJSON

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

```
public String toJSON()
```

Returns objet as a JSON5 String