Package androidx.constraintlayout.core
Class SolverVariableValues
- java.lang.Object
-
- androidx.constraintlayout.core.SolverVariableValues
-
- All Implemented Interfaces:
ArrayRow.ArrayRowVariables
public class SolverVariableValues extends java.lang.Object implements ArrayRow.ArrayRowVariables
Store a set of variables and their values in an array-based linked list coupled with a custom hashmap.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(SolverVariable v, float value, boolean removeFromDefinition)voidclear()booleancontains(SolverVariable variable)voiddisplay()voiddivideByAmount(float amount)floatget(SolverVariable variable)intgetCurrentSize()SolverVariablegetVariable(int index)floatgetVariableValue(int index)intindexOf(SolverVariable variable)voidinvert()voidput(SolverVariable variable, float value)floatremove(SolverVariable v, boolean removeFromDefinition)intsizeInBytes()java.lang.StringtoString()floatuse(ArrayRow definition, boolean removeFromDefinition)
-
-
-
Field Detail
-
mCache
protected final Cache mCache
-
-
Method Detail
-
getCurrentSize
public int getCurrentSize()
- Specified by:
getCurrentSizein interfaceArrayRow.ArrayRowVariables
-
getVariable
public SolverVariable getVariable(int index)
- Specified by:
getVariablein interfaceArrayRow.ArrayRowVariables
-
getVariableValue
public float getVariableValue(int index)
- Specified by:
getVariableValuein interfaceArrayRow.ArrayRowVariables
-
contains
public boolean contains(SolverVariable variable)
- Specified by:
containsin interfaceArrayRow.ArrayRowVariables
-
indexOf
public int indexOf(SolverVariable variable)
- Specified by:
indexOfin interfaceArrayRow.ArrayRowVariables
-
get
public float get(SolverVariable variable)
- Specified by:
getin interfaceArrayRow.ArrayRowVariables
-
display
public void display()
- Specified by:
displayin interfaceArrayRow.ArrayRowVariables
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clear
public void clear()
- Specified by:
clearin interfaceArrayRow.ArrayRowVariables
-
put
public void put(SolverVariable variable, float value)
- Specified by:
putin interfaceArrayRow.ArrayRowVariables
-
sizeInBytes
public int sizeInBytes()
- Specified by:
sizeInBytesin interfaceArrayRow.ArrayRowVariables
-
remove
public float remove(SolverVariable v, boolean removeFromDefinition)
- Specified by:
removein interfaceArrayRow.ArrayRowVariables
-
add
public void add(SolverVariable v, float value, boolean removeFromDefinition)
- Specified by:
addin interfaceArrayRow.ArrayRowVariables
-
use
public float use(ArrayRow definition, boolean removeFromDefinition)
- Specified by:
usein interfaceArrayRow.ArrayRowVariables
-
invert
public void invert()
- Specified by:
invertin interfaceArrayRow.ArrayRowVariables
-
divideByAmount
public void divideByAmount(float amount)
- Specified by:
divideByAmountin interfaceArrayRow.ArrayRowVariables
-
-