lsst.pex.config gba4ed39666+1ac82b564f
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
lsst.pex.config.listField.List Class Reference
Inheritance diagram for lsst.pex.config.listField.List:
lsst.pex.config.listField.ListField

Public Member Functions

 __init__ (self, config, field, value, at, label, setHistory=True)
 
 validateItem (self, i, x)
 
 list (self)
 
 __contains__ (self, x)
 
 __len__ (self)
 
None __setitem__ (self, int i, FieldTypeVar x, Any at=None, str label="setitem", bool setHistory=True)
 
None __setitem__ (self, slice i, Iterable[FieldTypeVar] x, Any at=None, str label="setitem", bool setHistory=True)
 
 __setitem__ (self, i, x, at=None, label="setitem", setHistory=True)
 
FieldTypeVar __getitem__ (self, int i)
 
MutableSequence[FieldTypeVar] __getitem__ (self, slice i)
 
 __getitem__ (self, i)
 
 __delitem__ (self, i, at=None, label="delitem", setHistory=True)
 
 __iter__ (self)
 
 insert (self, i, x, at=None, label="insert", setHistory=True)
 
 __repr__ (self)
 
 __str__ (self)
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 __setattr__ (self, attr, value, at=None, label="assignment")
 
 __reduce__ (self)
 

Protected Member Functions

Config _config (self)
 

Protected Attributes

 _field
 
 _config_
 
 _history
 
 _list
 
 _config
 

Properties

 history = property(lambda x: x._history)
 

Detailed Description

List collection used internally by `ListField`.

Parameters
----------
config : `lsst.pex.config.Config`
    Config instance that contains the ``field``.
field : `ListField`
    Instance of the `ListField` using this ``List``.
value : sequence
    Sequence of values that are inserted into this ``List``.
at : `list` of `~lsst.pex.config.callStack.StackFrame`
    The call stack (created by `lsst.pex.config.callStack.getCallStack`).
label : `str`
    Event label for the history.
setHistory : `bool`, optional
    Enable setting the field's history, using the value of the ``at``
    parameter. Default is `True`.

Raises
------
FieldValidationError
    Raised if an item in the ``value`` parameter does not have the
    appropriate type for this field or does not pass the
    `ListField.itemCheck` method of the ``field`` parameter.

Member Function Documentation

◆ insert()

lsst.pex.config.listField.List.insert ( self,
i,
x,
at = None,
label = "insert",
setHistory = True )
Insert an item into the list at the given index.

Parameters
----------
i : `int`
    Index where the item is inserted.
x : object
    Item that is inserted.
at : `list` of `~lsst.pex.config.callStack.StackFrame` or `None`,\
        optional
    The call stack (created by
    `lsst.pex.config.callStack.getCallStack`).
label : `str`, optional
    Event label for the history.
setHistory : `bool`, optional
    Enable setting the field's history, using the value of the ``at``
    parameter. Default is `True`.

◆ list()

lsst.pex.config.listField.List.list ( self)
Sequence of items contained by the `List` (`list`).

◆ validateItem()

lsst.pex.config.listField.List.validateItem ( self,
i,
x )
Validate an item to determine if it can be included in the list.

Parameters
----------
i : `int`
    Index of the item in the `list`.
x : object
    Item in the `list`.

Raises
------
FieldValidationError
    Raised if an item in the ``value`` parameter does not have the
    appropriate type for this field or does not pass the field's
    `ListField.itemCheck` method.

The documentation for this class was generated from the following file: