# PriorityGoalRow

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/PriorityGoalRow.java+class:androidx.constraintlayout.core.PriorityGoalRow) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
public class PriorityGoalRow extends ArrayRow
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.constraintlayout.core.ArrayRow](https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow) ||
|   | ↳ | [androidx.constraintlayout.core.PriorityGoalRow](https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow) |

*** ** * ** ***

Implements a row containing goals taking in account priorities.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#PriorityGoalRow(androidx.constraintlayout.core.Cache)(https://developer.android.com/reference/androidx/constraintlayout/core/Cache cache)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#addError(androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable error)` |
| `abstract void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#addError(androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#clear()()` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#getPivotCandidate(androidx.constraintlayout.core.LinearSystem,boolean[])(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, boolean[] avoid)` |
| `abstract void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#initFromRow(androidx.constraintlayout.core.LinearSystem.Row)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem.Row row)` |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#isEmpty()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#toString()()` |
| `abstract void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#updateFromFinalVariable(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.SolverVariable,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, boolean removeFromDefinition )` |
| `abstract void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#updateFromRow(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.ArrayRow,boolean)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow definition, boolean b)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow#updateFromRow(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.ArrayRow,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow definition, boolean removeFromDefinition )` |

| ### Inherited fields |
|---|
| From [androidx.constraintlayout.core.ArrayRow](https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow) |---|---| | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow.ArrayRowVariables` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#variables()` | |

| ### Inherited methods |
|---|
| From [androidx.constraintlayout.core.ArrayRow](https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow) |---|---| | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#addError(androidx.constraintlayout.core.LinearSystem,int)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, int strength)` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowDimensionRatio(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,float)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableC, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableD, float ratio )` Create a constraint to express `A = B + (C - D)` \* ratio We use this for ratio, where for example `Right = Left + (Bottom - Top) * percent` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEqualDimension(float,float,float,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int)( float currentWeight, float totalWeights, float nextWeight, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartA, int marginStartA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndA, int marginEndA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartB, int marginStartB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndB, int marginEndB )` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEqualMatchDimensions(float,float,float,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable)( float currentWeight, float totalWeights, float nextWeight, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndB )` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEquals(androidx.constraintlayout.core.SolverVariable,int)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, int value)` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEquals(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, int margin )` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowGreaterThan(androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable a, int b, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack)` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowGreaterThan(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack, int margin )` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowLowerThan(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack, int margin )` | | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowWithAngle(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,float)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable at, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable ab, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable bt, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable bb, float angleComponent )` Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle | | `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#getKey()()` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#initFromRow(androidx.constraintlayout.core.LinearSystem.Row)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem.Row row)` Used to initiate a goal from a given row (to see if we can remove an extra var) | | `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#pickPivot(androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable exclude)` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#reset()()` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromFinalVariable(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.SolverVariable,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, boolean removeFromDefinition )` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromSynonymVariable(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.SolverVariable,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, boolean removeFromDefinition )` | | `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromSystem(androidx.constraintlayout.core.LinearSystem)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system)` | |

## Public constructors

### PriorityGoalRow

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

```
public PriorityGoalRow(Cache cache)
```

## Public methods

### addError

```
public void addError(SolverVariable error)
```

### addError

```
public abstract void addError(SolverVariable variable)
```

### clear

```
public void clear()
```

### getPivotCandidate

```
public SolverVariable getPivotCandidate(LinearSystem system, boolean[] avoid)
```

### initFromRow

```
public abstract void initFromRow(LinearSystem.Row row)
```

### isEmpty

```
public boolean isEmpty()
```

### toString

```
public String toString()
```

### updateFromFinalVariable

```
public abstract void updateFromFinalVariable(
    LinearSystem system,
    SolverVariable variable,
    boolean removeFromDefinition
)
```

### updateFromRow

```
public abstract void updateFromRow(LinearSystem system, ArrayRow definition, boolean b)
```

### updateFromRow

```
public void updateFromRow(
    LinearSystem system,
    ArrayRow definition,
    boolean removeFromDefinition
)
```