Back to index

wims  3.65+svn20090927
Public Member Functions | Private Attributes
fr.ove.utils.ObjectsRepository Class Reference

A repository of the main objects used by the programm. More...

Collaboration diagram for fr.ove.utils.ObjectsRepository:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ObjectsRepository ()
 The Constructor.
Object putObject (Object object, String name)
 Puts an object with the specified name idenfier in the repository.
Object getObject (String name)
 Gets the object with the specified name indentifier in the repository.
Object removeObject (String name)
 Remove the object with the specified name identifier from the repository.
Hashtable getRepository ()
 Gets the repository.

Private Attributes

Hashtable repository
 The repository.

Detailed Description

A repository of the main objects used by the programm.

It is used as a repository of the different objects created that are supposed to be used (listener registering, ...) by other objects. Provide a convenient way to give the reference of objects to an another one. Rather than explicitly pass the reference to objects needed, pass the instance. The needed references are then obtains via a name that identifies the different objects.

Definition at line 20 of file ObjectsRepository.java.


Constructor & Destructor Documentation

The Constructor.

Definition at line 29 of file ObjectsRepository.java.

                               {
        repository = new Hashtable();
    }

Member Function Documentation

Object fr.ove.utils.ObjectsRepository.getObject ( String  name) [inline]

Gets the object with the specified name indentifier in the repository.

Parameters:
namethe name that identifies the object.

Definition at line 46 of file ObjectsRepository.java.

                                         {
        return repository.get(name);
    }

Gets the repository.

Definition at line 61 of file ObjectsRepository.java.

                                     {
        return repository;
    }
Object fr.ove.utils.ObjectsRepository.putObject ( Object  object,
String  name 
) [inline]

Puts an object with the specified name idenfier in the repository.

Parameters:
objectthe object to add.
namethe name that identifies the object.

Definition at line 38 of file ObjectsRepository.java.

                                                        {
        return repository.put(name, object);
    }
Object fr.ove.utils.ObjectsRepository.removeObject ( String  name) [inline]

Remove the object with the specified name identifier from the repository.

Parameters:
namethe name that identifies the object.

Definition at line 54 of file ObjectsRepository.java.

                                            {
        return repository.remove(name);
    }

Member Data Documentation

The repository.

Definition at line 24 of file ObjectsRepository.java.


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