eXchaNGeR

org.xngr
Class XProperties

java.lang.Object
  |
  +--org.xngr.XProperties

public class XProperties
extends Object

The class that can be used by the service to set properties.

Version:
$Revision: 1.1.1.1 $, $Date: 2002/02/16 16:12:52 $
Author:
Edwin Dankert

Constructor Summary
XProperties()
          Creates an empty properties list.
XProperties(String[][] properties)
          Creates a properties list with initial property values.
 
Method Summary
 String get(String key)
          Gets a property for a specific key.
 String[][] getProperties()
          Returns all the properties as an array of key value pairs.
 void put(String key, String value)
          Sets a property for a specific key.
 void setProperties(String[][] props)
          Sets all the properties as an array of key, value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XProperties

public XProperties()
Creates an empty properties list.

XProperties

public XProperties(String[][] properties)
Creates a properties list with initial property values. Where properties[X][0] is the key and properties[X][1] is the value for the key.
Parameters:
properties - a list of properties.
Method Detail

get

public String get(String key)
Gets a property for a specific key.
Parameters:
key - the key for the property.
Returns:
the value of the property, will return null if the key cannot be found

put

public void put(String key,
                String value)
Sets a property for a specific key.
Parameters:
key - the key for the property.
value - the value of the property.

setProperties

public void setProperties(String[][] props)
Sets all the properties as an array of key, value pairs. Where properties[X][0] is the key and properties[X][1] is the value for the key.
Parameters:
props - the array of key value pairs.

getProperties

public String[][] getProperties()
Returns all the properties as an array of key value pairs. where properties[X][0] is the key and properties[X][1] is the value for the key.
Returns:
an array of key value pairs.

eXchaNGeR

Copyright © 2002, Cladonia Ltd., All Rights Reserved