| Home | Trees | Index | Help |
|
|---|
| Package CedarBackup2 :: Module util :: Class ObjectTypeList |
|
object--+ |list--+ |UnorderedList--+ | ObjectTypeList
Class representing a list containing only objects with a certain type.
This is an unordered list.
We override the append, insert and
extend methods to ensure that any item added to the list
matches the type that is requested. The comparison uses the built-in
isinstance, which should allow subclasses of of the
requested type to be added to the list as well.
objectName value will be used in exceptions, i.e.
"Item must be a CollectDir object." if
objectName is "CollectDir".
| Method Summary | |
|---|---|
Initializes a typed list for a particular type. | |
Overrides the standard append method. | |
Overrides the standard insert method. | |
Overrides the standard insert method. | |
| Inherited from UnorderedList | |
Definition of == operator for this class. | |
Definition of ≥ operator for this class. | |
Definition of > operator for this class. | |
Definition of ≤ operator for this class. | |
Definition of < operator for this class. | |
Definition of != operator for this class. | |
| Inherited from list | |
x.__add__(y) <==> x+y | |
x.__contains__(y) <==> y in x | |
x.__delitem__(y) <==> del x[y] | |
Use of negative indices is not supported. | |
x.__getattribute__('name') <==> x.name | |
x.__getitem__(y) <==> x[y] | |
Use of negative indices is not supported. | |
x.__hash__() <==> hash(x) | |
x.__iadd__(y) <==> x+=y | |
x.__imul__(y) <==> x*=y | |
x.__iter__() <==> iter(x) | |
x.__len__() <==> len(x) | |
x.__mul__(n) <==> x*n | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
x.__rmul__(n) <==> n*x | |
x.__setitem__(i, y) <==> x[i]=y | |
Use of negative indices is not supported. | |
L.count(value) -> integer -- return number of occurrences of value | |
L.index(value, [start, [stop]]) -> integer -- return first index of value | |
L.pop([index]) -> item -- remove and return item at index (default last) | |
L.remove(value) -- remove first occurrence of value | |
L.reverse() -- reverse *IN PLACE* | |
L.sort(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) -> -1, 0, 1 | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Method Details |
|---|
__init__(self,
objectType,
objectName)
Initializes a typed list for a particular type.
|
append(self, item)Overrides the standardappend method.
|
extend(self, seq)Overrides the standardinsert method.
|
insert(self, index, item)Overrides the standardinsert method.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Sep 4 13:49:32 2006 | http://epydoc.sf.net |