|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.arsdigita.acs.AdSet
Implements a multiset of name-value pairs. Analogous to ns_set. Not really a Set implementation.... Implemented as Hashtable of Vectors.
| Constructor Summary | |
AdSet()
|
|
AdSet(HttpServletRequest request)
Constructs an AdSet out of the parameter/value pairs in the servlet request. |
|
AdSet(Object[][] objects)
Constructs an AdSet out of an array of arrays of name-value pairs. |
|
AdSet(ServletRequest request)
Constructs an AdSet out of the parameter/value pairs in the servlet request. |
|
| Method Summary | |
boolean |
contains(String key)
Returns true if AdSet contains key. |
void |
deleteKey(String key)
Removes key from this. |
String |
get(String key)
Gets a value for a given key. |
String[] |
getAll(String key)
Returns all values mapped from key. |
String[] |
keys()
Returns a list of valid keys in this datasource, for use with get(). |
Enumeration |
keysAndValues()
|
Enumeration |
keysAsEnumeration()
|
boolean |
next()
Returns false. |
void |
put(String key,
Object value)
Adds a key/value pair to this. |
void |
put(String key,
String value)
Adds a key/value pair to this. |
int |
rownum()
Returns the current row number. |
int |
size()
Returns number of keys in this AdSet. |
void |
update(String key,
String value)
Changes the first mapping from key to value. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public AdSet()
public AdSet(ServletRequest request)
request - The servlet request
public AdSet(HttpServletRequest request)
throws Exception
param_tmpfile if a supplied form
parameter named param is type=FILE.
Warning: this should only be called once for any given servlet request, because we cannot rewind the input stream for a multipart request.
request - The servlet request
public AdSet(Object[][] objects)
throws Exception
objects - an array of arrays of name value pairs. The first of the pair must be assignment compatible with String and the
second with Object. ie, something of the form:
new Object[][] = { {"foo", new Foo()},
{"bar", new Bar()},
{"baz", new Baz()},
{"glorp", new Glorp()} }| Method Detail |
public void put(String key,
String value)
key - The keyname - The value
public void put(String key,
Object value)
key - The keyname - The valuepublic String get(String key)
get in interface DataSourcekey - The keynull
if key is not mapped.public String[] getAll(String key)
key.key - The keykeypublic boolean contains(String key)
key.contains in interface DataSourcepublic boolean next()
false. For implementing DataSource.next in interface DataSource
public int rownum()
throws DataSourceException
rownum in interface DataSource
public void update(String key,
String value)
key to value.key - The keyvalue - The valuepublic void deleteKey(String key)
key from this.key - The key to removepublic String[] keys()
DataSourcekeys in interface DataSourcepublic Enumeration keysAsEnumeration()
public Enumeration keysAndValues()
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||