geirm       01/03/19 14:32:51

  Modified:    src/java/org/apache/velocity VelocityContext.java
  Log:
  docs
  
  Revision  Changes    Path
  1.4       +54 -7     
jakarta-velocity/src/java/org/apache/velocity/VelocityContext.java
  
  Index: VelocityContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/VelocityContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VelocityContext.java      2001/03/19 19:04:42     1.3
  +++ VelocityContext.java      2001/03/19 22:32:49     1.4
  @@ -79,45 +79,92 @@
    *  @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]">Fedor Karpelevitch</a>
  - *  @version $Id: VelocityContext.java,v 1.3 2001/03/19 19:04:42 geirm Exp $
  + *  @version $Id: VelocityContext.java,v 1.4 2001/03/19 22:32:49 geirm Exp $
    */
   public class VelocityContext extends AbstractContext implements Cloneable
   {
  -    /** storage for key/value pairs */
  +    /**
  +     *  storage for key/value pairs 
  +     */
       private HashMap context = new HashMap();
   
  -    /** default CTOR */
  +    /** 
  +     * default contructor, does nothing 
  +     * interesting
  +     */
       public VelocityContext()
       {
           super();
       }
   
  -    /** chaining CTOR */
  -    public VelocityContext( Context inner )
  +    /**
  +     *  Chaining constructor, used when you want to 
  +     *  wrap a context in another.  The inner context
  +     *  will be 'read only' - put() calls to the 
  +     *  wrapping context will only effect the outermost
  +     *  context
  +     *
  +     *  @param innerContext context impl to wrap
  +     */
  +    public VelocityContext( Context innerContext )
       {
  -        super( inner );
  +        super( innerContext );
       }
    
  +    /**
  +     *  retrieves value for key from internal
  +     *  storage
  +     *
  +     *  @param key name of value to get
  +     *  @return value as object
  +     */
       public Object internalGet( String key )
       {
           return context.get( key );
       }        
   
  +    /**
  +     *  stores the value for key to internal
  +     *  storage
  +     *
  +     *  @param key name of value to store
  +     *  @param value value to store
  +     *  @return previous value of key as Object
  +     */
       public Object internalPut( String key, Object value )
       {
           return context.put( key, value );
       }
   
  +    /**
  +     *  determines if there is a value for the
  +     *  given key
  +     *
  +     *  @param key name of value to check
  +     *  @return true if non-null value in store
  +     */
       public  boolean internalContainsKey(Object key)
       {
           return context.containsKey( key );
       }
   
  +    /**
  +     *  returns array of keys
  +     *
  +     *  @return keys as []
  +     */
       public  Object[] internalGetKeys()
       {
           return context.keySet().toArray();
       }
  -
  +    
  +    /**
  +     *  remove a key/value pair from the
  +     *  internal storage
  +     *
  +     *  @param key name of value to remove
  +     *  @return value removed
  +     */
       public  Object internalRemove(Object key)
       {
           return context.remove( key );
  
  
  

Reply via email to