ConstraintList¶
- class ConstraintList¶
List-like container of
Constraintobjects.Methods
__init__
Append a constraint to the end of the list.
Remove all constraints from the list.
Return a shallow copy of the constraint list.
Return the number of occurrences of a constraint in the list.
Extend the list with constraints from a sequence.
Return the index of the first occurrence of a constraint.
Insert a constraint at a given position.
Remove and return a constraint.
Remove the first matching constraint from the list.
Reverse the constraint list in place.
- class Iterator¶
- __init__(*args, **kwargs)¶
- __next__(self) Constraint¶
__next__
- 戻り値の型:
- __add__(self, arg: ConstraintList, /) ConstraintList¶
- __add__(self, arg: Constraint, /) ConstraintList
__add__
Overload 1.
- Args:
arg (amplify.ConstraintList)
- Returns:
amplify.ConstraintList:
Overload 2.
- Args:
arg (amplify.Constraint)
- Returns:
amplify.ConstraintList:
- __copy__(self) ConstraintList¶
__copy__
- 戻り値の型:
- __deepcopy__(self, memo: object | None = None) ConstraintList¶
__deepcopy__
- パラメータ:
memo (object | None) -- Defaults to
None.- 戻り値の型:
- __getitem__(self, key: int) Constraint¶
__getitem__
- パラメータ:
key (int)
- 戻り値の型:
- __iadd__(self, arg: ConstraintList, /) ConstraintList¶
- __iadd__(self, arg: Constraint, /) ConstraintList
__iadd__
Overload 1.
- Args:
arg (amplify.ConstraintList)
- Returns:
amplify.ConstraintList:
Overload 2.
- Args:
arg (amplify.Constraint)
- Returns:
amplify.ConstraintList:
- __imul__(self, arg: float, /) ConstraintList¶
__imul__
- パラメータ:
arg (float)
- 戻り値の型:
- __init__(self) None¶
- __init__(self, arg: Sequence[Constraint]) None
- __init__(self, arg: Iterable[Constraint]) None
__init__
Overload 2.
- Args:
arg (collections.abc.Sequence[amplify.Constraint])
Overload 3.
- Args:
arg (collections.abc.Iterable[amplify.Constraint])
- __itruediv__(self, arg: float, /) ConstraintList¶
__itruediv__
- パラメータ:
arg (float)
- 戻り値の型:
- __mul__(self, arg: float, /) ConstraintList¶
__mul__
- パラメータ:
arg (float)
- 戻り値の型:
- __radd__(self, arg: Constraint, /) ConstraintList¶
- __radd__(self, arg: int, /) ConstraintList
__radd__
Overload 1.
- Args:
arg (amplify.Constraint)
- Returns:
amplify.ConstraintList:
Overload 2.
- Args:
arg (int)
- Returns:
amplify.ConstraintList:
- __rmul__(self, arg: float, /) ConstraintList¶
__rmul__
- パラメータ:
arg (float)
- 戻り値の型:
- __setitem__(self, key: int, value: Constraint) None¶
__setitem__
- パラメータ:
key (int)
value (Constraint)
- __truediv__(self, arg: float, /) ConstraintList¶
__truediv__
- パラメータ:
arg (float)
- 戻り値の型:
- append(self, value: Constraint) None¶
Append a constraint to the end of the list.
- パラメータ:
value (Constraint)
- copy(self) ConstraintList¶
Return a shallow copy of the constraint list.
- 戻り値の型:
- count(self, value: Constraint) int¶
Return the number of occurrences of a constraint in the list.
- パラメータ:
value (Constraint) -- Constraint to count.
- 戻り値:
Number of occurrences.
- 戻り値の型:
- extend(self, sequence: Sequence[Constraint]) None¶
Extend the list with constraints from a sequence.
- パラメータ:
sequence (Sequence[Constraint])
- index(self, value: Constraint) int¶
- index(self, value: Constraint, start: int) int
- index(self, value: Constraint, start: int, end: int) int
Return the index of the first occurrence of a constraint. index index
Overload 1.
- Args:
value (amplify.Constraint): Constraint to find.
- Returns:
int: Index of the first match.
Overload 2.
- Args:
value (amplify.Constraint): Constraint to find.
start (int): Start index.
- Returns:
int: Index of the first match.
Overload 3.
- Args:
value (amplify.Constraint): Constraint to find.
start (int): Start index.
end (int): End index.
- Returns:
int: Index of the first match.
- insert(self, index: int, value: Constraint) None¶
Insert a constraint at a given position.
- パラメータ:
index (int)
value (Constraint)
- pop(self, index: int | None = None) Constraint¶
Remove and return a constraint.
- パラメータ:
index (int | None) -- Index to pop. If omitted, pop the last item. Defaults to
None.- 戻り値:
Popped constraint.
- 戻り値の型:
- remove(self, value: Constraint) None¶
Remove the first matching constraint from the list.
- パラメータ:
value (Constraint)