| 
 |   | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--sunlabs.brazil.properties.ExprProps
ExprProps is a subclass of Properties that
 is "smart" in the sense that it wraps a Calculator
 object, passing get and getProperty keys to
 the Calculator for processing.
 
 Keys are first searched for in the Properties
 object.  If not found, the key is passed to the getValue
 method of the wrapped Calculator object.  The
 Calculator will return null if the key
 consists of only a name or Brazil token and that name/token evaluates
 to 0.  In this case, a value associated with the key can not be
 "found" and the get or getpropertymethod returns
 null also.
 
Only property names that "look" like expressions (e.g. contain at least one of characters in [&|*+/%=!<>-]) are passed to the calculator.
Properties, 
Calculator, 
ExprPropsHandler, 
Serialized Form| Constructor Summary | |
| ExprProps()This constructor creates a Calculatorinstance with
 this instance ofExprPropsas it's symbol table. | |
| ExprProps(Properties defaults)This constructor creates a Calculatorinstance with
 this instance ofExprPropsas it's symbol table and
 with thePropertiesinstance referenced by the
 parameterdefaultsas it's set of default values. | |
| ExprProps(Request request)This constructor creates a Calculatorinstance withrequest.propsas it's symbol table. | |
| ExprProps(Request request,
          Properties defaults)This constructor creates a Calculatorinstance withrequest.propsas it's symbol table and with thePropertiesinstance referenced by the parameterdefaultsas it's set of default values. | |
| Method Summary | |
|  Object | get(Object key)Returns the value to which the specified key is mapped in this Hashtable. | 
|  String | getProperty(String key)Searches for the property with the specified key in this property list. | 
| Methods inherited from class java.util.Properties | 
| getProperty, list, list, load, propertyNames, save, setProperty, store | 
| Methods inherited from class java.util.Hashtable | 
| clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values | 
| Methods inherited from class java.lang.Object | 
| getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public ExprProps()
Calculator instance with
 this instance of ExprProps as it's symbol table.
public ExprProps(Properties defaults)
Calculator instance with
 this instance of ExprProps as it's symbol table and
 with the Properties instance referenced by the
 parameter defaults as it's set of default values.
defaults - the defaultspublic ExprProps(Request request)
Calculator instance with
 request.props as it's symbol table.
request - the Request instance
public ExprProps(Request request,
                 Properties defaults)
Calculator instance with
 request.props as it's symbol table and with the
 Properties instance referenced by the parameter
 defaults as it's set of default values.
request - the Request instancedefaults - the defaults| Method Detail | 
public Object get(Object key)
Hashtable.  If the key is not found, then it's value
 is computed by treating the key as an arithmetic expression or
 statement.
 
 If, during the computation, an ArithmeticException is
 thrown, the key compute.error is set in the base
 Properties.  The value associated with the key is
 an error message.
get in interface Mapget in class Hashtablekey - the Hashtable key
nullpublic String getProperty(String key)
 If, during the computation, an ArithmeticException is
 thrown, the key compute.error is set in the base
 Properties.  The value associated with the key is
 an error message.
 
 If the result of the computation is null, the default
 property list, and its defaults, recursively, are then checked. The
 method returns null if the property is not found.
getProperty in class Propertieskey - the property key
nulljava.util.Properties#defaults| 
 | Version 2.1, Generated 12/30/04 Copyright (c) 2001-2004, Sun Microsystems. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||