Packageorg.springextensions.actionscript.collections
Classpublic class Properties
InheritanceProperties Inheritance flash.events.EventDispatcher

The Properties class represents a collection of properties in the form of key-value pairs. All keys and values are of type String

Author: Christophe Herreman
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1



Public Properties
 PropertyDefined by
  propertyNames : Array
[read-only] Returns an array with the keys of all properties.
Properties
Public Methods
 MethodDefined by
  
Creates a new Properties object.
Properties
  
getProperty(key:String):String
Gets the value of property that corresponds to the given key.
Properties
  
load(url:String):void
Loads a collection of properties from an external file.
Properties
  
setProperty(key:String, value:String):void
Sets a property.
Properties
Property detail
propertyNamesproperty
propertyNames:Array  [read-only]

Returns an array with the keys of all properties. If no properties were found, an empty array is returned.

Implementation
    public function get propertyNames():Array
Constructor detail
Properties()constructor
public function Properties()

Creates a new Properties object.

Method detail
getProperty()method
public function getProperty(key:String):String

Gets the value of property that corresponds to the given key. If no property was found, null is returned.

Parameters
key:String — the name of the property to get

Returns
String
load()method 
public function load(url:String):void

Loads a collection of properties from an external file. Each property must be on a new line and in the form key= value. All keys and values are trimmed. Blank lines that do not contain properties are ignored. When the loading (and parsing) is done, a Event.COMPLETE event is dispatched.

Parameters
url:String — the url of the properties file
setProperty()method 
public function setProperty(key:String, value:String):void

Sets a property. If the property with the given key already exists, it will be replaced by the new value.

Parameters
key:String — the key of the property to set
 
value:String — the value of the property to set