| Package | org.pranaframework.collections |
| Class | public class Properties |
| Inheritance | Properties flash.events.EventDispatcher |
Properties class represents a collection of properties
in the form of key-value pairs. All keys and values are of type
String
| Property | Defined by | ||
|---|---|---|---|
| propertyNames : Array [read-only]
Returns an array with the keys of all properties.
| Properties | ||
| Method | Defined 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 | ||
| propertyNames | property |
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
| Properties | () | constructor |
public function Properties()
Creates a new Properties object.
| 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.
key:String — the name of the property to get
|
String |
| load | () | method |
public function load(url:String):voidLoads 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.
Parametersurl:String — the url of the properties file
|
| setProperty | () | method |
public function setProperty(key:String, value:String):voidSets a property. If the property with the given key already exists, it will be replaced by the new value.
Parameterskey:String — the key of the property to set
|
|
value:String — the value of the property to set
|