You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by dl...@locus.apache.org on 2000/08/26 06:07:53 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity Context.java
dlr 00/08/25 21:07:52
Modified: src/java/org/apache/velocity Context.java
Log:
Added some JavaDoc.
Revision Changes Path
1.2 +26 -0 jakarta-velocity/src/java/org/apache/velocity/Context.java
Index: Context.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/Context.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Context.java 2000/08/24 21:42:46 1.1
+++ Context.java 2000/08/26 04:07:52 1.2
@@ -61,27 +61,53 @@
protected Hashtable context;
protected Hashtable params;
+ /**
+ * Constructs the context under which to execute the templating engine.
+ */
public Context()
{
context = new Hashtable();
params = new Hashtable();
}
+ /**
+ * Adds a name/value pair to the context.
+ *
+ * @param key The name to key the provided value with.
+ * @param value The corresponding value.
+ */
public void put(String key, Object value)
{
context.put(key, value);
}
+ /**
+ * Gets the value corresponding to the provided key from the context.
+ *
+ * @param key The name of the desired value.
+ * @return The value corresponding to the provided key.
+ */
public Object get(String key)
{
return context.get(key);
}
+ /**
+ * Indicates whether the specified key is in the context.
+ *
+ * @param key The key to look for.
+ * @return Whether the key is in the context.
+ */
public boolean containsKey(Object key)
{
return context.containsKey(key);
}
+ /**
+ * Removes the specified key from the context.
+ *
+ * @param key The key to remove.
+ */
public Object remove(Object key)
{
return context.remove(key);