com.retek.commons.gui.core
Class Repository

java.lang.Object
  extended bycom.retek.commons.gui.core.Repository
Direct Known Subclasses:
RcomManager, RcomRepository

public class Repository
extends java.lang.Object

This class is basically just an HashMap wrapper for storing objects. It is generally used for state management. It is a static class that cannot be constructed. All the methods are static for convenience.


Constructor Summary
Repository()
           
 
Method Summary
static java.lang.Object get(java.lang.String name)
          Returns an object in the repository for a given name.
static boolean isEquals(java.lang.Object object, java.lang.String name)
          Compares an object with its key name to what is currently in the repository and returns whether or not it is equal to the one already there.
static void put(java.lang.String name, java.lang.Object object)
          Adds an object to the repository to make it available for global access.
static void remove(java.lang.String name)
          Removes an object from the RcomRepository for a given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository()
Method Detail

put

public static void put(java.lang.String name,
                       java.lang.Object object)
Adds an object to the repository to make it available for global access. Only one object may exists per name. New objects added with the same name replace the old objects.

Parameters:
name - The name to assign to the object in the repository.
object - The object to place in the repository.

get

public static java.lang.Object get(java.lang.String name)
Returns an object in the repository for a given name.

Parameters:
name - The name of the object to retrieve from the repository.
Returns:
The object in the repository for the given name, or null if none exists.

remove

public static void remove(java.lang.String name)
Removes an object from the RcomRepository for a given name.

Parameters:
name - The name of the object to remove from the repository.

isEquals

public static boolean isEquals(java.lang.Object object,
                               java.lang.String name)
Compares an object with its key name to what is currently in the repository and returns whether or not it is equal to the one already there.

Parameters:
object - The object to compare.
name - The name of the object in the Repository.


Copyright © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25