KeyValue
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Author: | Arthur Clemens |
| Classpath: | org.asapframework.data.KeyValue |
| File last modified: | Thursday, 12 October 2006, 11:09:19 |
Key-value object class.
Summary
Constructor
KeyValue
function KeyValue (
inKey:String,
inValue:Object)
Creates a new KeyValue object.
Parameters:
inKey :
(optional) key
inValue:
(optional) value
Instance properties
key
key:String
(read,write)
value
value:Object
(read,write)
Instance methods
stringify
function stringify (
inDelimiter:String) : String
Creates a String
key inDelimiter value.Parameters:
inDelimiter:
connecting string between key and value
Returns:
A new String with key, inDelimiter, value. Returns an empty String if value is empty or undefined.
stringifyWithFormattedString
function stringifyWithFormattedString (
inFormattedString:String) : String
Returns the key-value pairs as formatted string.
Parameters:
inFormattedString:
accepts %1 and %2 as format parameters
Returns:
A new string with the key-values formatted.
Example:
Author Tolstoj
var author:KeyValue= new KeyValue("Author", "Tolstoj"); var myHtml:String = author.stringifyWithFormattedString("<font color='#666666'>%1</font> <font color='#000000'>%2</font>");Result:
Author Tolstoj
toString
function toString (
) : String