firecrown.updatable.UpdatableCollection

class firecrown.updatable.UpdatableCollection(iterable=None)[source]

Bases: UserList

UpdatableCollection is a list of Updatable objects and is itself Updatable.

Every item in an UpdatableCollection must itself be Updatable. Calling update on the collection results in every item in the collection being updated.

Public Methods:

__init__([iterable])

Initialize the UpdatableCollection from the supplied iterable.

update(params)

Update self by calling update() on each contained item.

reset()

Resets self by calling reset() on each contained item.

required_parameters()

Return a RequiredParameters object formed by concatenating the RequiredParameters of each contained item.

get_derived_parameters()

Get all derived parameters if any.

append(item)

Append the given item to self.

__setitem__(key, value)

Set self[key] to value; raise TypeError if Value is not Updatable.

Inherited from UserList

__init__([initlist])

__repr__()

Return repr(self).

__lt__(other)

Return self<value.

__le__(other)

Return self<=value.

__eq__(other)

Return self==value.

__gt__(other)

Return self>value.

__ge__(other)

Return self>=value.

__contains__(item)

__len__()

__getitem__(i)

__setitem__(i, item)

__delitem__(i)

__add__(other)

__radd__(other)

__iadd__(other)

__mul__(n)

__rmul__(n)

__imul__(n)

__copy__()

append(item)

S.append(value) -- append value to the end of the sequence

insert(i, item)

S.insert(index, value) -- insert value before index

pop([index])

Raise IndexError if list is empty or index is out of range.

remove(item)

S.remove(value) -- remove first occurrence of value.

clear()

copy()

count(value)

index(value, [start, [stop]])

Raises ValueError if the value is not present.

reverse()

S.reverse() -- reverse IN PLACE

sort(*args, **kwds)

extend(other)

S.extend(iterable) -- extend sequence by appending elements from the iterable

Inherited from MutableSequence

__setitem__(index, value)

__delitem__(index)

insert(index, value)

S.insert(index, value) -- insert value before index

append(value)

S.append(value) -- append value to the end of the sequence

clear()

reverse()

S.reverse() -- reverse IN PLACE

extend(values)

S.extend(iterable) -- extend sequence by appending elements from the iterable

pop([index])

Raise IndexError if list is empty or index is out of range.

remove(value)

S.remove(value) -- remove first occurrence of value.

__iadd__(values)

Inherited from Sequence

__getitem__(index)

__iter__()

__contains__(value)

__reversed__()

index(value, [start, [stop]])

Raises ValueError if the value is not present.

count(value)

Inherited from Reversible

__reversed__()

__subclasshook__(C)

Abstract classes can override this to customize issubclass().

Inherited from Collection

__subclasshook__(C)

Abstract classes can override this to customize issubclass().

Inherited from Sized

__len__()

__subclasshook__(C)

Abstract classes can override this to customize issubclass().

Inherited from Iterable

__iter__()

__subclasshook__(C)

Abstract classes can override this to customize issubclass().

__class_getitem__

Inherited from Container

__contains__(x)

__subclasshook__(C)

Abstract classes can override this to customize issubclass().

__class_getitem__

Private Methods:

Inherited from UserList

_UserList__cast(other)


__setitem__(key, value)[source]

Set self[key] to value; raise TypeError if Value is not Updatable.

append(item)[source]

Append the given item to self.

If the item is not Updatable a TypeError is raised.

Parameters

item (Updatable) – new item to be appended to the list

Return type

None

final get_derived_parameters()[source]

Get all derived parameters if any.

Return type

Optional[DerivedParameterCollection]

final required_parameters()[source]

Return a RequiredParameters object formed by concatenating the RequiredParameters of each contained item.

Return type

RequiredParameters

final reset()[source]

Resets self by calling reset() on each contained item.

final update(params)[source]

Update self by calling update() on each contained item.

Parameters

params (ParamsMap) – new parameter values