Package pyamf :: Package util :: Class IndexedCollection
[hide private]
[frames] | no frames]

Class IndexedCollection

source code


A class that provides a quick and clean way to store references and referenced objects.


Note: All attributes on the instance are private.

Instance Methods [hide private]
 
__init__(self, use_hash=False, exceptions=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
clear(self)
Clears the index.
source code
 
getByReference(self, ref)
Returns an object based on the reference.
source code
 
getReferenceTo(self, obj)
Returns a reference to obj if it is contained within this index.
source code
 
append(self, obj)
Appends obj to this index.
source code
 
__eq__(self, other) source code
 
__len__(self) source code
 
__getitem__(self, idx) source code
 
__contains__(self, obj) source code
 
__repr__(self)
repr(x)
source code
 
__iter__(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Instance Variables [hide private]
  exceptions
If True then ReferenceError will be raised, otherwise None will be returned.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, use_hash=False, exceptions=True)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getByReference(self, ref)

source code 

Returns an object based on the reference.

Raises:

getReferenceTo(self, obj)

source code 

Returns a reference to obj if it is contained within this index.

Raises:

append(self, obj)

source code 

Appends obj to this index.

Returns:
The reference to obj in this index.

Note: Uniqueness is not checked

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)