Ribs API

com.ribs
Class RBKeyChain

java.lang.Object
  extended bycom.ribs.RBKeyChain

public class RBKeyChain
extends java.lang.Object

This class contains static utility methods for generically getting and setting values on any object using a key chain string.


Field Summary
static java.lang.String delim
           
static java.lang.String delimRegex
           
 
Constructor Summary
RBKeyChain()
           
 
Method Summary
static java.lang.Object getValueForKey(java.lang.Object anObject, java.lang.String aKey)
          Get a value from an object, given a dotted path of property names, for instance: "Model.SelectedObject" returns the value for: anObject.getModel().getSelectedObject()
static void setValueForKey(java.lang.Object anObject, java.lang.String aKey, java.lang.Object aValue)
          Sets a value in given object for given key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delim

public static final java.lang.String delim
See Also:
Constant Field Values

delimRegex

public static final java.lang.String delimRegex
See Also:
Constant Field Values
Constructor Detail

RBKeyChain

public RBKeyChain()
Method Detail

getValueForKey

public static java.lang.Object getValueForKey(java.lang.Object anObject,
                                              java.lang.String aKey)
Get a value from an object, given a dotted path of property names, for instance: "Model.SelectedObject" returns the value for: anObject.getModel().getSelectedObject()

Parameters:
anObject - the object to get a value from
Returns:
the reuslting value or null, if any null value was found on the path.

setValueForKey

public static void setValueForKey(java.lang.Object anObject,
                                  java.lang.String aKey,
                                  java.lang.Object aValue)
Sets a value in given object for given key.

Parameters:
anObject -
aKey -
aValue -

Ribs API.