private void AddStringProperty(String key, String token)
{
Object o = this[key];
/*
* $$$ GMJ
* FIXME : post 1.0 release, we need to not assume
* that a scalar is a String - it can be an Object
* so we should make a little vector-like class
* say, Foo that wraps (not extends Vector),
* so we can do things like
* if ( !( o instanceof Foo) )
* so we know it's our 'vector' container
*
* This applies throughout
*/
/*
* do the usual thing - if we have a value and
* it's scalar, make a vector, otherwise add
* to the vector
*/
if (o is String)
{
ArrayList v = new ArrayList(2);
v.Add(o);
v.Add(token);
CollectionsUtil.PutElement(this, key, v);
}
else if (o is ArrayList)
{
((ArrayList) o).Add(token);
}
else
{
AddPropertyDirect(key, token);
}
}